Skip to main content

lowcoai-lowcodb

Python client for the lowcodb manager service. Sync and asyncio clients with the same surface, built on httpx. Python 3.10+.

pip install lowcoai-lowcodb

Quick start

from lowcoai.lowcodb import LowcodbClient

with LowcodbClient("<token-or-api-key>", org_id="org_123") as client:
    bases = client.list_bases()
    base = client.create_base({"name": "crm", "baseType": "internal"})

    row = client.create_record(base["schema"], "leads", {"name": "Ada", "status": "open"})
    open_leads = client.list_records(base["schema"], "leads", filter="status='open'", size=50)

asyncio

from lowcoai.lowcodb import AsyncLowcodbClient

async with AsyncLowcodbClient("<token-or-api-key>", org_id="org_123") as client:
    bases = await client.list_bases()

AsyncLowcodbClient has the same methods as LowcodbClient; each one is a coroutine. Close it with await client.aclose() if you don't use async with.

Options

Argument Description
token User token or API key, sent as Authorization: Bearer <token>. Required.
org_id Sent as the X-Org-Id header.
base_url Origin of the manager, e.g. "http://lowcodb-service:8080" in-cluster. Defaults to https://api.lowco.ai.
api_base_path Route prefix, default /v1/lowcodb.
default_headers Extra headers added to every request.
timeout Per-request timeout in seconds (default 30). None disables it.
http_client Your own httpx.Client / httpx.AsyncClient (proxies, retries, test transports). It is not closed by the SDK.

client.set_org_id(...) and client.set_header(key, value) change headers for later requests; pass None to remove.

Data shapes

Request and response bodies are plain dicts typed as TypedDicts (Base, Table, Column, DBFunction, …) whose keys match the JSON on the wire (camelCase). A value returned by one call can be sent back as the body of another. Rows are dict[str, Any] (LowcodbRecord).

List methods take keyword-only page_no, size, filter and sort.

Surface

Area Methods
Health health
Bases get_base, create_base, update_base, delete_base, list_bases, export_base_collection (bytes), sync_base_tables
Tables get_table, create_table, update_table, delete_table, list_tables
Columns get_column, create_column, bulk_create_columns, update_column, bulk_update_columns, delete_column, list_columns, validate_field
Table indexes get_table_index, create_table_index, update_table_index, list_table_indexes, delete_table_index
Records create_record, get_record, update_record, delete_record, list_records, count_records, create_bulk_records, update_bulk_records, delete_bulk_records
View data get_view_record, list_view_records, count_view_records
Dashboards get_overview_counts, get_metrics_dashboard, get_dashboard_overview
Triggers get_trigger, create_trigger, update_trigger, delete_trigger, list_triggers
Webhooks get_webhook, create_webhook, update_webhook, delete_webhook, list_webhooks
Transactions execute_transaction
Events publish_event
DB functions list_functions, get_function, create_function, update_function, delete_function, list_function_versions, execute_function, invoke_function
Query execute_query, get_query_suggestions
Views (metadata) list_views, create_view, get_view, update_view, delete_view, refresh_view

Transactions

client.execute_transaction(
    "app_crm",
    [
        {"type": "create", "table": "leads", "record": {"name": "Ada"}},
        {"type": "update", "table": "accounts", "id": "acc_1", "record": {"leadCount": 4}},
    ],
)

All operations succeed or none apply (internal bases only).

DB functions

fn = client.create_function(
    {
        "baseId": base["id"],
        "name": "Score lead",
        "functionKey": "score-lead",
        "body": "return { score: ctx.request.body.value * 2 };",
    }
)

result = client.execute_function(fn["id"], {"value": 21})  # console run: result, logs, error
value = client.invoke_function("app_crm", "score-lead", {"value": 21})  # data-plane call
value = client.invoke_function("app_crm", "score-lead", method="GET")

Errors

Every non-2xx response raises LowcodbError with status_code, message, code and the raw body:

from lowcoai.lowcodb import LowcodbError

try:
    client.invoke_function("app_crm", "score-lead", {})
except LowcodbError as err:
    print(err.status_code, err.message, err.code)

When the manager answers with an opaque platform code ("AAS-00105") as the message, message carries the human-readable error.details instead; the code is still in body. Network failures and timeouts surface as httpx exceptions.

Metadata

Release files for lowcoai-lowcodb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lowcoai-lowcodb 0.1.0
File Size Uploaded
lowcoai_lowcodb-0.1.0.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lowcoai-lowcodb 0.1.0
File Interpreter ABI Platform
lowcoai_lowcodb-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / lowcoai_lowcodb-0.1.0.tar.gz

Download URL lowcoai_lowcodb-0.1.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c04e38db85a1f25a9c00cc5a768c54645ef669b4b7f89549383d3fcc8ec3b453
BLAKE2b-256 checksum
How to use checksums
d9db73f3ddee1b0c8ba1d4f3a3f8fd2cb540a1781e8cdf49904c1e636290d629
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / lowcoai_lowcodb-0.1.0-py3-none-any.whl

Download URL lowcoai_lowcodb-0.1.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
771a9bffcd88e832a0c70e3282a0d142c2d15f381446e5b212f514d2c66b2743
BLAKE2b-256 checksum
How to use checksums
e624e45629d3a1562a4c62d3e1946983fa0d1a359a533c2f4e652c9692b86636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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