Skip to main content

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

This version

0.1

Download files

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

Files for giftbit, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size giftbit-0.1-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size giftbit-0.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page