Python SDK for accessing Quickbooks Online APIs
Project description
QuickbooksOnlineSDK
Python SDK for accessing QBO APIs.
Installation
This project requires Python 3+ and Requests library (pip install requests).
-
Download this project and use it (copy it in your project, etc).
-
Install it from pip.
$ pip install qbosdk
Usage
To use this SDK you'll need these QBO credentials used for OAuth2 authentication: client ID, client secret and refresh token.
This SDK is very easy to use.
- First you'll need to create a connection using the main class QuickbooksOnlineSDK.
from qbosdk import QuickbooksOnlineSDK
connection = QuickbooksOnlineSDK(
client_id='<YOUR CLIENT ID>',
client_secret='<YOUR CLIENT SECRET>',
refresh_token='<YOUR REFRESH TOKEN>',
realm_id='<REALM / COMPANY ID>',
environment='<sandbox / production>'
)
- After that you'll be able to access any of the API classes
"""
USAGE: <QuickbooksOnlineSDK INSTANCE>.<API_NAME>.<API_METHOD>(<PARAMETERS>)
"""
# Get a list of all Employees (with all available details for Employee)
response = connection.employees.get()
# Get a list of all Accounts
response = connection.accounts.get()
See more details about the usage into the wiki pages of this project.
Integration Tests
To run integration tests, you will need a mechanism to connect to a real qbo account. Save this info in a test_credentials.json file in your root directory:
{
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"realm_id": "<realm_id>",
"refresh_token": "<refresh_token>",
"environment": "<environment sandbox / production>"
}
$ pip install pytest
$ python -m pytest test/integration
License
This project is licensed under the MIT License - see the LICENSE file for details
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 qbosdk-0.10.0.tar.gz
.
File metadata
- Download URL: qbosdk-0.10.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b866d5fe092abf37bb7e5fae8c40904a6957231d06fbfda62dc6d4db3d98a10b |
|
MD5 | 8cb653c63611a9095f5ef30059d42816 |
|
BLAKE2b-256 | 53a1b725d73e602338dfdce76a11e9231812b2ecee5daf86e751b4bb762a08d4 |
Provenance
File details
Details for the file qbosdk-0.10.0-py3-none-any.whl
.
File metadata
- Download URL: qbosdk-0.10.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac71b5faa8a8b9bcaa88f3cb7af06489821b7599ca91a9078aee74032d2ff8a5 |
|
MD5 | 3043b9ca1ba523e2a43d5b6a02732d97 |
|
BLAKE2b-256 | bc7582336902a415abf28d2f2820813474d10d51ad7559fce969d1b1abd8c9a2 |