Skip to main content

Tremendous Api Client Python package

Project description

PyPI version

Tremendous Api Client Python PyPackage

Tremendous Api Client client is a Python library to access services quickly.

Installation

Use the package manager pip to install foobar.

pip install TremendousClient

Environment Variables

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TremendousClient-0.0.6.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

TremendousClient-0.0.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file TremendousClient-0.0.6.tar.gz.

File metadata

  • Download URL: TremendousClient-0.0.6.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for TremendousClient-0.0.6.tar.gz
Algorithm Hash digest
SHA256 80142244e9cd5c3301a782b9026fcce15a4d7edc9a5ff654dd40e59b0512c821
MD5 8c29c26e4513746988f2d797f7feef37
BLAKE2b-256 e91795f557e1037123845cffe55e4a402ab81ca5682a5723786efb6a14b0d0c7

See more details on using hashes here.

File details

Details for the file TremendousClient-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for TremendousClient-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a616068508fb783d6e6137c145e66815cc759bbc298ec0a01b840a171b55a345
MD5 bff5306c08e919012d29d92fef8eb21c
BLAKE2b-256 5712cf8124536db1e11748c13af50b40089d0ba81789a04c6568272fc0092b48

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page