https://github.com/blueromans/tremendous
Tremendous API Client For Python
https://github.com/blueromans/tremendous
api-client pip pypi pypi-package python requests tremendous
Last synced: 13 days ago
JSON representation
Tremendous API Client For Python
- Host: GitHub
- URL: https://github.com/blueromans/tremendous
- Owner: blueromans
- License: mit
- Created: 2023-04-26T20:24:53.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-15T11:16:11.000Z (about 3 years ago)
- Last Synced: 2025-02-12T21:38:04.958Z (over 1 year ago)
- Topics: api-client, pip, pypi, pypi-package, python, requests, tremendous
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/TremendousClient)
# Tremendous Api Client Python PyPackage
Tremendous Api Client client is a Python library to access services quickly.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install foobar.
```bash
pip install TremendousClient
```
## Environment Variables
```bash
TREMENDOUS_ENV: 'dev|prod'
TREMENDOUS_TOKEN: 'TREMENDOUS TOKEN'
```
### Note
If you don't want to set this variables from global environment you can pass them to class.
You can see usage below
## Usage
```python
from tremendous import TremendousService
kwargs = {
# you can also set tremendous environment from environment.
'environment': 'dev|prod', # Default value : dev
# you can also set token from environment.
'token': 'tremendous token', # Default value : None
}
# Initialize client with
tremendous_service = TremendousService()
# or tremendous_service = TremendousService(**kwargs)
# For Products
products = tremendous_service.getProducts()
# For Funding Source
funding_source = tremendous_service.getFundingSource()
# For Create Order
body = {
"payment": {
"funding_source_id": "funding_source_id"
},
"rewards": [
{
"products": [
"product_id"
],
"value": {
"denomination": 2,
"currency_code": "USD"
},
"recipient": {
"name": "John Doe Jr.",
"email": "johndoe@example.com"
},
"delivery": {
"method": "LINK"
}
}
]
}
order = tremendous_service.createOrder(body)
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
[MIT](https://choosealicense.com/licenses/mit/)