Skip to main content

ContractModel ↔ SQLModel bridge for ETLantic.

Project description

etlantic-sqlmodel

Optional bridge between ETLantic Data contracts and SQLModel table models for ETLantic 0.14.

pip install 'etlantic==0.14.0' 'etlantic-sqlmodel==0.14.0'
# or: pip install 'etlantic[sqlmodel]'

Sessions, Alembic migrations, and repository helpers are deferred to 1.1+. This package focuses on schema mapping and metadata comparison only.

Usage

from etlantic import Data
from etlantic_sqlmodel import (
    compare_metadata,
    contract_to_sqlmodel,
    create_plugin,
    sqlmodel_to_contract,
)


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


CustomerTable = contract_to_sqlmodel(
    Customer,
    table_name="customer",
    primary_key=("customer_id",),
)

metadata = sqlmodel_to_contract(CustomerTable)
report = compare_metadata(Customer, CustomerTable)
assert report.valid

plugin = create_plugin()

This bridge is used explicitly through its public conversion helpers; it does not require a profile engine setting. Register create_plugin() only with tooling that consumes the schema-mapping plugin object.

Generated SQLModel classes are reviewable starting points — relational choices such as primary keys and table names must be supplied explicitly.

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

etlantic_sqlmodel-0.14.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

etlantic_sqlmodel-0.14.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file etlantic_sqlmodel-0.14.0.tar.gz.

File metadata

  • Download URL: etlantic_sqlmodel-0.14.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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}

File hashes

Hashes for etlantic_sqlmodel-0.14.0.tar.gz
Algorithm Hash digest
SHA256 18541bd1bfee612466ae578188548f618a9ba9bd213f71b4fb6b01d3d9848775
MD5 df5a3aef39f1a7059a8613711a4290f3
BLAKE2b-256 259b507a9756c4a939fda1715ccdd532507a9086030bedb5e8c445bbf865b91f

See more details on using hashes here.

File details

Details for the file etlantic_sqlmodel-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: etlantic_sqlmodel-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","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}

File hashes

Hashes for etlantic_sqlmodel-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ea3597a19b37c7c3fddc53b5fb9a520ab2af4d2a7b831800a8d4339eba0bbf4
MD5 513d71ab1a52b791b6be0efff4998cef
BLAKE2b-256 6799f58a48ab7fb3e6eab5466cc9ca6a0a945e90afd64bdfae927c2652570c26

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