A Python SDK for GiftBit's API
Project description
giftbit-python
A Python SDK for GiftBit's API.
Installation
$ pip install giftbit
Getting Started
API Credentials
The GiftbitClient
needs your Giftbit credentials. You can pass them into the constructor
or use the environment variable GIFTBIT_API_KEY
.
from giftbit import GiftbitClient
client = GiftbitClient(api_key="<your api key here>")
# or using the environment variable
client = GiftbitClient()
By default, the GiftbitClient
uses Giftbit's testbed API. To use the production API server, do the following:
from giftbit import GiftbitClient,
client = GiftbitClient(testbed=False)
You can check to see if the client is configured correctly by using the ping method
from giftbit import GiftbitClient,
client = GiftbitClient(testbed=False)
result = client.ping()
print(result)
Brands
List Brands
from giftbit import GiftbitClient,
client = GiftbitClient()
result = client.list_brands()
for brand in result['brands']:
print(brand['name'])
Get Individual Brand
from giftbit import GiftbitClient,
client = GiftbitClient()
result = client.get_brand('amazonus')
print(result['brand'])
Regions
Not implemented yet
Campaigns
Not implemented yet
Funds
Not implemented yet
Gifts
Not implemented yet
Links
Not implemented yet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
giftbit-0.1.tar.gz
(3.1 kB
view details)
Built Distribution
giftbit-0.1-py3-none-any.whl
(3.9 kB
view details)
File details
Details for the file giftbit-0.1.tar.gz
.
File metadata
- Download URL: giftbit-0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 577a10e8c8ad0c365ca83a91af2f255ba34b8a425b48c14c4dde1f61b444f075 |
|
MD5 | 592e2763dec86347f421ece2e04c7a74 |
|
BLAKE2b-256 | a6af431bac459c35f5e3c1efd69e24296b4d7d3c30e6390d7f9d16ca800f4f58 |
File details
Details for the file giftbit-0.1-py3-none-any.whl
.
File metadata
- Download URL: giftbit-0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 830109652c51ea416ac1c88aab049734e3bfe67b2c4b4d8d59e4aabdb71c2dea |
|
MD5 | 89199cd3cc5a413295fc3b9232eafb81 |
|
BLAKE2b-256 | 5ad01151701cec682bbcca8dd14c5617a8525673e81f628c93fe9f237b155e40 |