A client library for the FreshBooks API
Project description
Refreshbooks provides a simple synchronous API for manipulating FreshBooks invoices, clients, and other data:
from refreshbooks import api c = api.OAuthClient( 'example.freshbooks.com', 'consumerkey', 'My Consumer Secret', 'An existing token', 'An existing token secret' ) response = c.invoice.create( invoice=dict( client_id='8', lines=[ api.types.line( name='Yard Work', unit_cost='10', quantity='4' ) ] ) ) invoice_response = c.invoice.get( invoice_id=response.invoice_id ) print "New invoice created: #%s (id %s)" % ( invoice_response.invoice.number, invoice_response.invoice.invoice_id )
Consumer keys and secrets can be obtained from FreshBooks. This library does not handle negotiating for an OAuth token+secret pair; see the oauth module or the OAuth specification for details.
This library also supports the older token-based API authorization scheme:
c = api.TokenClient( 'example.freshbooks.com', 'My API token' ) # ... as above ...
API methods return lxml.objectify.ObjectifiedDataElement trees, which can be manipulated as Python objects with the same structure as the underlying XML.
References:
http://developers.freshbooks.com/ - The FreshBooks API
http://developers.freshbooks.com/api/oauth/ - FreshBooks and OAuth
Changes in 1.1
Refreshbooks now uses persistent HTTP connections whenever possible.
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
Built Distribution
File details
Details for the file refreshbooks-1.1.tar.gz
.
File metadata
- Download URL: refreshbooks-1.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
30d15ad45bd3a137bbc2b578194c9c3dd1ef776da3e884ed764f70fde9e720f1
|
|
MD5 |
6954a0dfc068bcde4478a32a67591dc5
|
|
BLAKE2b-256 |
8347ecbad2b1799593f62cfc18776a2fd4c5a980e669c905a72d17a013b12a63
|
File details
Details for the file refreshbooks-1.1-py2.6.egg
.
File metadata
- Download URL: refreshbooks-1.1-py2.6.egg
- Upload date:
- Size: 13.2 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
23e57b076857beb9ab842ac900c9b70f7bccc793d2a5aed26e58a561d7ee9ea8
|
|
MD5 |
b05af4492c2134b9904ef5253599aab4
|
|
BLAKE2b-256 |
477c0e74943713d8a6c3c16ec3539bde381339a2c8b59b63cbc648f3ff02910a
|