Skip to main content

quickbase-model-maker

model_maker_logo


A lightweight tool for creating and managing QuickBase models!

Turn this 👎

# select relevant info
select = [3, 43, 23, 63, 21, 52, 24, 54]

Into this 👍

from references.order_manager import Order
select = [
    Order.RECORD_ID,
    Order.ORDER_TYPE,
    Order.ORDER_NUMBER,
    Order.DELIVERY_DATE
    ...
]

With just a few lines of code!


Installation

pip install quickbase-model-maker

Usage

Initializing

The sample code below will initialize your models for use in your application. Models are created within their respective app folders, in a new directory called references.

# import model maker
from quickbase_model_maker import ModelMaker

# create model maker with realm and auth info
qmm = ModelMaker(realm='realm', auth='AUTH-TOKEN')

# register tables you wish to create models from
qmm.register_tables([
    ('bqs5asdf', 'bqs5aser'), # ('app_id', 'table_id') tuples
    ('bqs5abzc', 'brzaners'),
    ('bqs5abzc', 'brzanvac'),
    ('bqs5abzc', 'bqs5wers'),
])

Generate your models, based off of the registered tables, with the .sync() method.

# call sync method to create models
qmm.sync(only_new_tables=True)

Optionally, you can sync all registered tables, regardless of whether they have already been synced. It is recommended to call .sync() only when you wish to re-generate models, as each model sync with Quickbase costs 1 API call. You only have to generate models once - or when you wish to update your models (i.e. new field you need to access added on quickbase). Calling .sync() on every script run could result in a large number of API calls.

qmm.sync()

In code

Once registered and created, models can be used in your application.
The following code uses a fictional "Order" model to demonstrate how one can access the ORDER_TYPE field. One can also access useful metadata through methods like .table_id() and .app_id().

from references.orders import Order
print(Order.ORDER_TYPE)
print(Order.table_id())

Removing Models

Models can easily be removed by doing the following:

  • Remove the model from the references/app directory
  • Remove the related table from the references/__init__.py file.
  • Remove the related table tuple from the .register_tables() method.

Metadata

Release files for quickbase-model-maker 0.1.2

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-model-maker 0.1.2
File Size Uploaded Provenance Actions
quickbase_model_maker-0.1.2.tar.gz 7.6 kB Without provenance Details for quickbase_model_maker-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quickbase-model-maker 0.1.2
File Interpreter ABI Platform Actions
quickbase_model_maker-0.1.2-py3-none-any.whl Python 3 none any Details for quickbase_model_maker-0.1.2-py3-none-any.whl

Total release size: 12.7 kB

Release files / quickbase_model_maker-0.1.2.tar.gz

Download URL quickbase_model_maker-0.1.2.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e9f83f876364650219d956e03caebaeece9419c04d55ce612426cec760fbd6a3
BLAKE2b-256 checksum
How to use checksums
714ee1972ce089402403556d1f5707bbe494059530cb3ddcaa6029d2ce7fdbeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / quickbase_model_maker-0.1.2-py3-none-any.whl

Download URL quickbase_model_maker-0.1.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64ba83061d0fea17fdf82af248c93bc4cba20ffb9ca92286ca432c02dfc3c6ca
BLAKE2b-256 checksum
How to use checksums
7783c5ca15dea3d40910108ee57a629e54ccba78da62c4d1db08ef4ae577eb19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Security for quickbase-model-maker 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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