SQLModel / SQLAlchemy DBSession adapter for Causeway.
Project description
causeway-db-sqlmodel
SQLModel / SQLAlchemy DBSession adapter for Causeway. Auto-loads from settings.database_url.
from causeway import register
from causeway_db_sqlmodel import SqlModelSession
register(SqlModelSession(dsn="postgresql+asyncpg://user:pass@host/db"))
Typed JSON columns
Use json_field() when a JSON column has a real Python shape and route code
should not deal with dict[str, Any].
from msgspec import Struct
from sqlmodel import SQLModel
from causeway_db_sqlmodel import json_field
class ScreeningSnapshot(Struct):
score: int
reasons: list[str]
class Customer(SQLModel, table=True):
id: int | None = None
screening: ScreeningSnapshot = json_field(ScreeningSnapshot)
The database still stores JSON/JSONB. Values are converted to built-in JSON
types on write and converted back to ScreeningSnapshot on read.
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
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 causeway_db_sqlmodel-0.6.0.tar.gz.
File metadata
- Download URL: causeway_db_sqlmodel-0.6.0.tar.gz
- Upload date:
- Size: 75.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d0e387b28e93b49118f87e0dc46280f940c0c7f4aa74b8424cde03efd64b78e
|
|
| MD5 |
e2a1bed4dfef5d9fd4750933d427b29a
|
|
| BLAKE2b-256 |
8f597f443109681e2538952abc294bcde92f108ababef9f569b928d56b836782
|
Provenance
The following attestation bundles were made for causeway_db_sqlmodel-0.6.0.tar.gz:
Publisher:
release.yml on tamimbinhakim/causeway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
causeway_db_sqlmodel-0.6.0.tar.gz -
Subject digest:
8d0e387b28e93b49118f87e0dc46280f940c0c7f4aa74b8424cde03efd64b78e - Sigstore transparency entry: 1614675658
- Sigstore integration time:
-
Permalink:
tamimbinhakim/causeway@17d3452128d8967f6ba5e7ffa4b99de07e5fb859 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tamimbinhakim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@17d3452128d8967f6ba5e7ffa4b99de07e5fb859 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file causeway_db_sqlmodel-0.6.0-py3-none-any.whl.
File metadata
- Download URL: causeway_db_sqlmodel-0.6.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aee280cc3b101ba282104f1f039ccc556dfeda3ae89a738bffd55afa72e1b26f
|
|
| MD5 |
61fb070e87c298c86d451f179cabb2ca
|
|
| BLAKE2b-256 |
887427d5cb875818cbd3a8336ab6ea7f0e08c71b037ec4a2c0328d409e3e9c77
|
Provenance
The following attestation bundles were made for causeway_db_sqlmodel-0.6.0-py3-none-any.whl:
Publisher:
release.yml on tamimbinhakim/causeway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
causeway_db_sqlmodel-0.6.0-py3-none-any.whl -
Subject digest:
aee280cc3b101ba282104f1f039ccc556dfeda3ae89a738bffd55afa72e1b26f - Sigstore transparency entry: 1614675696
- Sigstore integration time:
-
Permalink:
tamimbinhakim/causeway@17d3452128d8967f6ba5e7ffa4b99de07e5fb859 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tamimbinhakim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@17d3452128d8967f6ba5e7ffa4b99de07e5fb859 -
Trigger Event:
workflow_dispatch
-
Statement type: