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

Uploaded Source

Built Distribution

qbosdk-0.16.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qbosdk-0.16.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for qbosdk-0.16.1.tar.gz
Algorithm Hash digest
SHA256 72b149ee673ce7e8759ff4d7ccf6982ad91daea0792c59e07da7face186f22b7
MD5 ac4da754931ecdc0bbd4f0f25155a690
BLAKE2b-256 929a544d82d34f7ee1285815bc4e62ca4a5fb96e22f7a31118ad9d1c922ec349

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: qbosdk-0.16.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for qbosdk-0.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 990e53e265b85c7d01096901ef5ae3bb0e3f8c6274861817761fa4023af0f140
MD5 79e30d9c298243a0106ad980fbfee6d7
BLAKE2b-256 ba68b5cb583552b0a60b531855429b694cf9435dc5f80ecc92a546b5e7ed5405

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