Skip to main content

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).

  1. Download this project and use it (copy it in your project, etc).

  2. 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.

  1. 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>'
)
  1. 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


Download files

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

Source Distribution

qbosdk-0.2.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

qbosdk-0.2.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file qbosdk-0.2.1.tar.gz.

File metadata

  • Download URL: qbosdk-0.2.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for qbosdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5dc745be6c7fb5b764f8ecdba9e75c4cf3092d568cf4ea5a2324332a98fce360
MD5 5d7da5c9b28a0ea8c3d7cfa9f1457fae
BLAKE2b-256 a8276e543010d4acfe916957f7d923e9ccd5406682df1e5f753504706795d139

See more details on using hashes here.

Provenance

File details

Details for the file qbosdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: qbosdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

File hashes

Hashes for qbosdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed2bab9f0e47f138bf5b7fec6f255ac80206151e510c19be8fd48c2ed32b512
MD5 24136e51bd84424867c122b4ede8c3d4
BLAKE2b-256 795e772481c744c6423000904acbb2f31007dc216cb464961bacee4d36472939

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page