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.36.

Install

pip install etlantic-sqlmodel

Sessions, Alembic migrations, and repository helpers are planned across 0.40–0.44. 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.

Links

Optional packages · Source · Issues

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.36.0.tar.gz (5.9 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.36.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: etlantic_sqlmodel-0.36.0.tar.gz
  • Upload date:
  • Size: 5.9 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.36.0.tar.gz
Algorithm Hash digest
SHA256 5ea7c7dde221f8ab304f3cf56870a1c3bb329a935d8f8a7e9cecc8a6540bd96f
MD5 c92d115935b1f3ec079ff64184ca57f6
BLAKE2b-256 f4789339e9155ff7f4f3ab8eb9f61014f8bbcf7e1c1823f59d18ca98855d3fc4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: etlantic_sqlmodel-0.36.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.36.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76d97948493a888df5e700048695bc521426b27ff632b9091595e5e4a91f3e00
MD5 c94b00155a1eea5d5d43661126cddca2
BLAKE2b-256 37ec2d10c022166cb3fc03d174699ddc64b6759c4316ea8fbd40052422563a49

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