ContractModel ↔ SQLModel bridge for ETLantic.
Project description
etlantic-sqlmodel
Optional bridge between ETLantic Data contracts and
SQLModel table models for ETLantic 0.20.
pip install 'etlantic==0.33.0' 'etlantic-sqlmodel==0.33.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file etlantic_sqlmodel-0.33.0.tar.gz.
File metadata
- Download URL: etlantic_sqlmodel-0.33.0.tar.gz
- Upload date:
- Size: 5.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
332cdfeb772507826c59914a4d423b34390d3e061d07bdcd6880bfc772da44f9
|
|
| MD5 |
c879665e584ba24d28bc9260c9a48000
|
|
| BLAKE2b-256 |
6fc0f1ec5b64bd041a6b4d5fae5f75599242df772009f921cc318d2ed43102b5
|
File details
Details for the file etlantic_sqlmodel-0.33.0-py3-none-any.whl.
File metadata
- Download URL: etlantic_sqlmodel-0.33.0-py3-none-any.whl
- Upload date:
- Size: 6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4edd6b528688e3e298069b136610460db1bcef1841541a76be5255e3bba1f0
|
|
| MD5 |
03620a93c4c3bcb4290268b0718a5989
|
|
| BLAKE2b-256 |
4af30a6caa09932f7a52421173a295bb31994d90eeb364dbbb9daee8b477993c
|