Python client for Quickbase structural operations, trustees management, schema backups, and schema exporting
Project description
QuickBase-Structure-Client
Python client for Quickbase structural administration: apps, tables, fields, relationships, trustees, Solutions/QBL exports, and schema snapshots.
This package is intended to pair with quickbase-data-client. The data client
handles records, reports, files, and pandas workflows. This structure client
focuses on administration and schema lifecycle work.
Installation
pip install quickbase-structure-client
For local development:
python -m pip install -e ".[dev]"
pytest
Quickstart
from quickbase_structure_client import Auth, QuickBaseStructureClient
auth = Auth("example.quickbase.com", "qb-user-token")
client = QuickBaseStructureClient(auth, auto_backup=False)
app = client.create_app("Managed Operations", description="Built by automation")
orders = app.create_table(
"Order",
plural_name="Orders",
single_record_name="Order",
)
orders.create_field(
"Total",
"currency",
{"description": "Order total"},
)
schema = client.exporter.compile_schema(app.id)
print(client.exporter.to_markdown(schema))
Solutions / QBL
Solution creation accepts the raw QBL document required by Quickbase:
from pathlib import Path
qbl = Path("solution.qbl").read_text(encoding="utf-8")
result = client.solutions.create_solution(qbl)
Auto Backup
auto_backup=True is the default. Mutating app/table/field/relationship/trustee
calls trigger a pre-change and post-change backup.
client = QuickBaseStructureClient(
auth,
auto_backup=True,
backup_method="schema",
backup_solution_id="solution-id",
backup_dir="backups",
)
If backup_method="schema" has no backup_solution_id and fallback is enabled,
the client falls back to app cloning. Internal backup calls suppress their own
backup hooks to avoid recursive clone storms.
PTO Demo
The demo script builds a small PTO tracking app with a Users table, a
PTO Events table, fields, an optional relationship, optional trustee access,
and schema exports.
Copy the sample environment file and fill in real Quickbase credentials:
copy .env.example .env
Preview the plan without creating anything:
python examples/pto_tracking_demo.py --env-file .env
Create the live Quickbase app:
python examples/pto_tracking_demo.py --env-file .env --execute
You can also set QUICKBASE_DEMO_EXECUTE=true in .env. The script refuses to
execute with placeholder credentials from .env.example.
If Quickbase returns User token is invalid, verify that:
QUICKBASE_REALM_HOSTNAMEis the same realm where the token was generated.QUICKBASE_USER_TOKENis a user token, not an app token.QUICKBASE_DEMO_ASSIGN_TOKEN=truewhen creating a new demo app. User tokens are scoped to assigned apps, so a token can create an app but still fail on table/field calls unless it is assigned to that new app.- The value has no quotes, comments, or copied label text around it.
- The token's user has permission to create apps in that realm.
If Quickbase returns Extraneous key 'description' is not permitted while
creating fields, use fieldHelp instead of description. The client maps
description to fieldHelp for field create/update convenience.
Supported Surface
- Core sync client:
QuickBaseStructureClient - Request tuning:
RequestConfig - App wrapper:
StructureApp - Table wrapper:
StructureTable - Field wrapper:
StructureField - Relationship wrapper:
StructureRelationship - Trustee manager:
TrusteesManager - Solutions/QBL manager:
SolutionsManager - Schema exporter:
SchemaExporter
Notes
- Python 3.10+ is required.
- Tests are mock-based and validate payload/method composition plus local backup behavior. They do not prove live tenant permissions or endpoint availability.
- Destructive app deletion requires the app name as confirmation because the Quickbase API requires that confirmation payload.
DISCLAIMER
This project was made primarily through the use of LLMs. As a result its code is open and available for all.
License
The Unlicense. See LICENSE.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quickbase_structure_client-0.1.0.tar.gz.
File metadata
- Download URL: quickbase_structure_client-0.1.0.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c242e5f2e4b11ac67a3242112be3f90d8c2c4b8986a32914870e53237a1fc66
|
|
| MD5 |
199bb4da24b2f5035a051845ebf7cf39
|
|
| BLAKE2b-256 |
9cfca3f7fb12c67bbb4de0102a9f001ce402e4429fcb1c5f58f0495ad6a79b30
|
File details
Details for the file quickbase_structure_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: quickbase_structure_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a609690b7fa31a12583a9aac38b14df7ce4a21af96ba243187a860e392b5e2bf
|
|
| MD5 |
5792599ceb3c5a19bd5eb8d5d55264ca
|
|
| BLAKE2b-256 |
9181a0aef1b0a9b89cea36ef54e3bf589275298c23c0cc3685766b890b873df3
|