A lightweight tool for interacting with Quickbase's RESTful API
Project description
my-quickbase
A simple means to interact with Quickbase databases, making use of Quickbase's RESTful API.
Requirements
- pytest
- requests
- python-decouple
Installation
pip install my-quickbase
Usage
Backup All Tables
The complete_backup method will produce a folder of JSON backups for every report in every table, where the report name contains the string 'BACKUP'
For example:
To commence the backup:
import my_quickbase as mq
query = mq.AppQuery(app_id='xxxxxx',
realm='myrealm.quickbase.com',
token='QB-USER-TOKEN xxxxxxx')
query.complete_backup()
Note: The realm and token parameters can be optional if variables Q_REALM and Q_USER_TOKEN are added to the environment variables or added to a settings.ini file.
Acquire Iterable of Records for a Single Report
Returns a generator expression comprising an iterable of other generator objects, each representing an API call. The actual calls are only made when something is done with the data (e.g. converting to list, exporting to JSON).
query = mq.RecordsQuery(app_id='xxxxxx',
table_id='xxxxx'
realm='myrealm.quickbase.com',
token='QB-USER-TOKEN xxxxxxx')
# This must be called first
query.get_field_mapping()
# Returns a generator expression, which can be converted:
query.get_records(report_id='12345')
# e.g. Convert to List:
records_lst = list(query.get_records(report_id='12345'))
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
Built Distribution
Hashes for my_quickbase-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73d1d430fd7b620d4df29c1f3fb14133dc42f6413e3e60424dd9286557a5f099 |
|
MD5 | 93f5669405a46dcb850b3b9d2496f875 |
|
BLAKE2b-256 | a12e7e3c3ce42317a608a9b83351677027090b6ca6fb50a96d2b2291bbe2ee8d |