Skip to content
LACE
  • v0.1 Current
  • Python
  • TypeScript Soon

lace-app-sdk

Data collections

Collections are typed with JSON Schema and served through the governed AppDataService — tenant-scoped, audited, with an automatic admin panel.

app/data.pypython
# app/data.py — typed, tenant-scoped collections with an admin panel for free.
from lace_app_sdk.data import AppDataCollectionSchema

TICKETS = AppDataCollectionSchema(
    app_id="acme.field_intake",
    collection_id="tickets",
    display_name="Intake Tickets",
    storage_backend="generic_app_data",
    json_schema={
        "type": "object",
        "properties": {
            "subject":  {"type": "string"},
            "priority": {"enum": ["low", "normal", "urgent"]},
            "evidence_blob": {"type": "string"},
        },
    },
)

Binary payloads

Binary content goes through put_blob and get_blob rather than being inlined into records. Blobs are tenant-scoped and audited on the same terms as structured data.

No raw tables, no policy bypass

Apps never hold a database handle. Reads and writes go through AppDataService, which applies tenancy and policy on every call — so there is no path where an app reaches storage directly and the audit log simply does not see it. The admin panel that comes with a collection is generated from the same schema, which is why it exists without being written.

Next: tools.