Skip to main content

A thin python wrapper for the fastbill API

Project description

Super thin Python wrapper for Fastbill’s HTTP API developed by STYLIGHT.

Latest release:

fastbill 0.5.2

  • Added NOK to CURRENCIES dict.

fastbill 0.5.1

  • Support pickling of FastbillResponse objects. The link to the API connection will not be pickled though. API credentials will also not be pickled.

fastbill 0.5.0

  • Introduce name parameter to better distinguish FastbillWrapper instances.

fastbill 0.4.3

  • Bugfix release.
  • Calls to potential special methods like __unicode__ would lead to an erroneous Fastbill API call.

fastbill 0.4.2

  • Improved debug logging.
  • Deprecated `FastbillHttpError` Execption. Now only FastbillResponseError will be raised. FastbillResponseError will inherit from FastbillHttpError for the time being, but catching FastbillHttpError is deprecated. Use FastbillResponseError instead.
  • Improved testcase to check for failing API calls as well.

fastbill 0.4.1

  • Experimental: Improved FastbillResponse to allow ORM like object traversals. Use with caution.
  • Added property currency which looks up the proper ISO 4217 currency abbreviation when a CURRENCY_CODE integer is present in the response. An AttributeError will be raised when it’s not present.


  • only supports JSON payloads
  • doesn’t (overly) check for consistency of responses
  • doesn’t convert date strings to datetime objects


  • requests


pip install fastbill


from fastbill import FastbillWrapper

# Construct the api client for Fastbill's automatic API

client = FastbillWrapper('fastbill_user', 'fastbill_key')

# You can also specify a service_url, in case you need Fastbill's core API instead:

core_client = FastbillWrapper('fastbill_user', 'fastbill_key', service_url='endpoint_url')

# Make requests, e.g. service customer.create


# Search for customer, subscriptions, etc...

for customer in client.customer_get(filter={'city': 'Munich'}):
    print customer

# But you can also see the full result

result = client.customer_get(filter={'city': 'Munich'})
print result.keys()

# Will give you 'CUSTOMERS'

Project details

Download files

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

Files for fastbill, version 0.5.2
Filename, size File type Python version Upload date Hashes
Filename, size fastbill-0.5.2.tar.gz (5.2 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