Skip to main content

etlantic-sqlmodel

Optional bridge between ETLantic Data contracts and SQLModel table models, plus optional CP1 control-plane reference stores. Install when you need contract_to_sqlmodel helpers or SQLModel-backed definition/submission stores for local CP1 demos. Package version is 0.54.0 — pin with core.

Install

pip install 'etlantic-sqlmodel==0.54.0'
# pip install 'etlantic==0.54.0'

Schema bridge

from etlantic import Data
from etlantic_sqlmodel import contract_to_sqlmodel, compare_metadata


class Customer(Data):
    customer_id: int
    name: str


CustomerTable = contract_to_sqlmodel(
    Customer,
    table_name="customer",
    primary_key=("customer_id",),
)
assert compare_metadata(Customer, CustomerTable).valid

Control-plane reference stores (CP1/CP2)

Request-scoped sessions and SQLModel-backed DefinitionRepository / SubmissionStore / CP2 RegistryProvider implementations. Persistence models are separate from HTTP response models. create_control_plane_tables and create_registry_tables are for tests and local demos only — production must apply versioned migrations via etlantic_sqlmodel.migrations (do not use create_all as the sole schema path).

from etlantic_sqlmodel.control_plane import (
    SQLModelDefinitionRepository,
    SQLModelSubmissionStore,
    SqlModelRegistryProvider,
    create_sqlite_engine,
)
from etlantic_sqlmodel.migrations import apply_migrations

engine = create_sqlite_engine("sqlite:///cp.db")
apply_migrations(engine)  # all provider-owned CP1–CP4 tables
registry = SqlModelRegistryProvider(engine)
definitions = SQLModelDefinitionRepository(engine)
submissions = SQLModelSubmissionStore(engine)

Registry conformance (memory vs SQLModel promote/suspend):

uv run python scripts/check_registry_conformance.py --fake

These stores honor scoped idempotency and survive process restart when backed by a durable database URL. For CP-GA Supported profiles, treat snapshots as canonical for backup/restore; entity dual-write rows are denormalized mirrors for isolation queries. Use separate engines/schemas per tenant for isolated-deployment / dedicated-schema.

Optional packages · Source · Issues

Release files for etlantic-sqlmodel 0.54.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 etlantic-sqlmodel 0.54.0
File Size Uploaded
etlantic_sqlmodel-0.54.0.tar.gz 30.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for etlantic-sqlmodel 0.54.0
File Interpreter ABI Platform
etlantic_sqlmodel-0.54.0-py3-none-any.whl Python 3 none any Details

Total release size: 71.8 kB

Release files / etlantic_sqlmodel-0.54.0.tar.gz

Download URL etlantic_sqlmodel-0.54.0.tar.gz
Size 30.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b0c1e867e47c31170d81d2ac0f58f562fd52091fc7ffee20006ea8ec84bc3ca5
BLAKE2b-256 checksum
How to use checksums
e80bb1d1576fb6290995d5fd780bc86d367aed0c368c10c80877ec519ff970d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / etlantic_sqlmodel-0.54.0-py3-none-any.whl

Download URL etlantic_sqlmodel-0.54.0-py3-none-any.whl
Size 41.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b33aba6a4c40653debb7f57c02db8282e6247ae9ea246897f46b8daf8d319621
BLAKE2b-256 checksum
How to use checksums
7b7564f6ae709ec92998189a7e731ede617aa8d1397a46c96cf39137dabb9b4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
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