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.7.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

qbosdk-0.7.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qbosdk-0.7.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for qbosdk-0.7.0.tar.gz
Algorithm Hash digest
SHA256 cec16284ccf56d1203d9e984024d334c76e68ecc480de6d6edb880e492034bc2
MD5 fdbbcc14abe6aa5227f5abd8e2c7e4f9
BLAKE2b-256 3c8dd4be2d7312103c97f09d84a189263bea2a09a5e45c1ac650085906fe7cc0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: qbosdk-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for qbosdk-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f74b69000cd2e2a14ca23307a8ba125622d108eed58d65941d8a910a83b711e8
MD5 e9f8d9e3295c0137428652daa118eb46
BLAKE2b-256 9f9576008b70e010a80a19579ceac6e75cc410c0af58216bf50d4daa693aae49

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