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.7.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

TremendousClient-0.0.7-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: TremendousClient-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 8814fd6d0662ba892c71bba53b20211e25ddde0fa29522c210ccb1822a80eab6
MD5 d7d00fd07319c2f87d377303542c01dc
BLAKE2b-256 7ba64d5e9a94bd17556f1eea59571097b6086fd907556d879a6761ff1a8f17cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TremendousClient-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 33d84b7897e6760c881d208eb76aa5b3bae018ba1f8236b55858e0483bd9cbe0
MD5 d853b24d48126246239e899c89105f57
BLAKE2b-256 e290dea146e164f8e0ccf68d74d6688f651b4f6dfd1ee218406229bfe26ab72b

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