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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: TremendousClient-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 fd15030b16c6bc8a5c736d04ef453526304549bec6ec02f3033d3bc6c80e77bf
MD5 24de19936255ae6cfc570c0fc098dd0c
BLAKE2b-256 3bcd6f64f799f7163ba47622b18b7fdf76c56a85a12da9ae13a0a70e9eb3e0ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TremendousClient-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a900bd5380b2279716e5751173ac1866f3073cd1a633416327031d031166f8f6
MD5 701ba90b82b13fe7af6fa90a58627691
BLAKE2b-256 439c428890b2a9d27b87a56651ae51825d49b9b632821d2b87f7f0bea7e55085

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