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.19.0.tar.gz
.
File metadata
- Download URL: qbosdk-0.19.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f7d4f52069faca8796ed3ffa00112219736466dd903b2063479ff21d9b0dfd4 |
|
MD5 | 0ffb131ccc9346dc4ed1f3a4444d84c7 |
|
BLAKE2b-256 | 6c74bdf3a942d2ed8e3bb30dee837486e8a805e5b8daa32308771e243856d504 |
File details
Details for the file qbosdk-0.19.0-py3-none-any.whl
.
File metadata
- Download URL: qbosdk-0.19.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a906d7f709aceab452b48b7b6dc06122b4b70d9f5f25e2ad5fb753d2b1cc6dc4 |
|
MD5 | 1c26ab23f50dd385190db684f1cb1a51 |
|
BLAKE2b-256 | fb0bfa67ae37d21bdab833b3bd303fe40c8e9a7f293f154e8a38fa62ad661b37 |