Python wrapper for quickbase JSON API.
Project description
quickbase-json-api-client
Unofficial Quickbase JSON API wrapper for python
Makes life a little easier!
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.client import QuickbaseJSONClient # import client
client = QuickbaseJSONClient(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.
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
response = client.query_records('tableId', fids, 'queryString')
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.
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()
Returns the actual data. Equivalent to calling .get('data')
- denest()
Denests the data. I.e. changes {'fid': {'value': 'actualValue'}}
to {'fid': 'actualValue'}
- orient(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()
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()
Rounds all float integers into whole number ints. i.e. converts 55.0
to 55
.
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
Hashes for quickbase-json-api-client-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ead257bc906e0d21ffadb38114f897ff3acf119967873e9eff9729dcc2bc8a4 |
|
MD5 | af5019661f7e06f0544f4776d0f87031 |
|
BLAKE2b-256 | ef4acf7ece4af8d4efc045580da46dd53b4dba506e5b542c855f2ebdbda6aa6d |
Hashes for quickbase_json_api_client-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5baa6bfb504fb79d2b0ec288678c3d21db3c65dd2d2fb09ad87bd1d176d955 |
|
MD5 | 025a563c21b857d9e8677be59398d840 |
|
BLAKE2b-256 | 84ea5af20abec87eec37a466105d4e38e1b8cd4a8df37550c481378ff1ed811a |