Skip to main content

A lightweight model maker for quickbase

Project description

quickbase-model-maker

model_maker_logo

Installation

pip install quickbase-model-maker

Usage

Initializing

The sample code below will initialize your models for use in your application. Registering tables costs 1 API call per table. You do not have to register your tables upon every script run. It is recommended that you register your tables and sync only once (or when you wish to update your models) via the python terminal.

# import model maker
from quickbase_model_maker.model_maker import QuickbaseModelMaker

# create model maker with realm and auth info
qmm = QuickbaseModelMaker(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'),
])

# call sync method to create models
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())

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

quickbase_model_maker-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quickbase_model_maker-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file quickbase_model_maker-0.1.1.tar.gz.

File metadata

  • Download URL: quickbase_model_maker-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for quickbase_model_maker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 215aef523bab3570ba1349edb7a1b367cb840ca96db0ed9199f6ea9b9fb69c87
MD5 50bc24352a537a41c132709ff1e9bf3e
BLAKE2b-256 9e1386e2897ab00d6e48807a02dfa6e12e9fae6c48f1628fd93083f1629395a7

See more details on using hashes here.

File details

Details for the file quickbase_model_maker-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for quickbase_model_maker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a74f838bc6886e02e0374e06d00b5b31b3d4227664864bcd8d6908a888b7408
MD5 b57b0f0639150a67dda2f49d620886be
BLAKE2b-256 d46d97aff644e511a5248e6f3c7002f4b9f4502a4c900d07f00db0c298fe4204

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page