Skip to main content

quickbase-json-api-client

logo_1x

build size license downloads

Unofficial QuickBase JSON API wrapper for Python.

logo

Created by Synctivate Developers! Custom software solutions from Fredericksburg, Virginia!

Documentation

https://github.com/robswc/quickbase-json-api-client/wiki

Quickstart

Installation

To install, run:

pip install quickbase-json-api-client

Initialize Client

Use the following code to create and initialize a client object.

from quickbase_json import QBClient

client = QBClient(realm="yourRealm", auth="userToken")

Where yourRealm is the name (subdomain) of your Quickbase Realm and userToken is the user token used to authenticate with the realm. You can also include an optional agent: str argument, which will change the User-Agent (used in headers) from the default "QJAC" to whatever string is passed. This is heavily recommended, as it makes figuring out the origin of API calls easier.

Query Records

Querying for records is one of the most useful features of the Quickbase JSON API. Querying records with QJAC can be done using the following code

Basic Example

response = client.query_records(table='tableId', select=[3, 6, 12], where='queryString')
data = response.data()

Where tableId is the ID of the table you wish to query from, fids is a list of field IDs you wish to receive and queryString is a quickbase query string.

Adv. Example

from quickbase_json.helpers import Where
# have static fids for table/records
NEEDED_FIDS = [3, 6, 12]
# build query str where 3 is either 130, 131 or 132
# https://help.quickbase.com/api-guide/componentsquery.html
q_str = Where(3, 'EX', [130, 131, 132]).build(join='OR') 
response = client.query_records(table='tableId', select=NEEDED_FIDS, where=q_str)

In this example, we use the Where() helper. This can make building complex QuickBase queries easier.

The Where() helper documentation can be found here.

Response Objects

A QBResponse object is returned when querying records with QJAC. A QBResponse has several methods that make handling returned data easier. Here are a few of the most useful ones.

Response Methods

  • .data()
r = qbc.query_records(...).data()

Returns the data from QuickBase. Equivalent to calling .get('data')

  • .denest()
r = qbc.query_records(...).denest()

Denests the data. I.e. changes {'fid': {'value': 'actualValue'}} to {'fid': 'actualValue'}

  • orient(orient: str, key: int)
r = qbc.query_records(...).orient('records', key=3)

Orients the data. Currently, the only option is 'records'. This will orient the returned data into a "record like structure", i.e. changes {'fid': 'actualValue', 'fid': 'actualValue'} to {'key': {etc: etc}}

  • convert()
r = qbc.query_records(...).convert('datetime')

Converts the data, based on fields and provided arguments. For example, calling convert('datetime') will convert all data with fields of the 'date time' type to python datetime objects. Other conversions are 'currency' and 'int'.

  • round_ints()
r = qbc.query_records(...).round_ints()

Rounds all float integers into whole number ints. i.e. converts 55.0 to 55.

Additional Features

Information on additional features that go beyond the scope of an introduction README.md, can be found on the GitHub Wiki!

This include things like...

Issues/Bugs

If you come across any issues or want to file a bug report, please do so here.

Thanks!

Metadata

Release files for quickbase-json-api-client 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quickbase-json-api-client 0.3.0
File Size Uploaded
quickbase-json-api-client-0.3.0.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quickbase-json-api-client 0.3.0
File Interpreter ABI Platform
quickbase_json_api_client-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.5 kB

Release files / quickbase-json-api-client-0.3.0.tar.gz

Download URL quickbase-json-api-client-0.3.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
77f26512c2ec39be0d389b5f4f787de32925f3ea3ca3080395a7c13a4c35b0e8
BLAKE2b-256 checksum
How to use checksums
74909bc0d4916c82b226da613b778803c408aae31b47c3a082e3b9996952513f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.6

Release files / quickbase_json_api_client-0.3.0-py3-none-any.whl

Download URL quickbase_json_api_client-0.3.0-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d553d0d4e4977cea5d55bdd6215a40790421b3448f8eac903c449fd749f34246
BLAKE2b-256 checksum
How to use checksums
ac95fd8594bd598bf1fe4753dc4218d6c7f253ffc4ea047ab471eccc5753993b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page