Super lightweight bridge for storing Skir-typed values in SQLAlchemy JSON columns.
Project description
skir-sqlalchemy
Super lightweight bridge between Skir serializers and SQLAlchemy JSON columns.
Install
pip install skir-sqlalchemy
DenseJson
DenseJson(serializer) stores values of type T in a SQLAlchemy JSON column using Skir's dense JSON format.
serializer:skir_client.Serializer[T]keep_unrecognized_values: forwarded toserializer.from_json(...)
Example
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
from skir_alchemy import DenseJson
from geometry_skir import Point
class Base(DeclarativeBase):
pass
class GeometryRow(Base):
__tablename__ = "geometry"
id: Mapped[int] = mapped_column(primary_key=True)
point: Mapped[Point | None] = mapped_column(DenseJson(Point.serializer))
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
skir_sqlalchemy-0.1.1.tar.gz
(4.3 kB
view details)
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 skir_sqlalchemy-0.1.1.tar.gz.
File metadata
- Download URL: skir_sqlalchemy-0.1.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67f1c81ea488e665c8b7a7bc01256de71679fd0c0b231485fe53403ec11c7290
|
|
| MD5 |
5dc04cc977f26e4adb1dce6cdcdd6d48
|
|
| BLAKE2b-256 |
fe2153dd5d881f56a5e03046e41c3b0a22763b8c04e1bafdba640f9e57a0255d
|
File details
Details for the file skir_sqlalchemy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: skir_sqlalchemy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e87c99854ac594bf69fa5fd1b024cb7eb801f0bcc6dfcf33b9a61bfe0c90293f
|
|
| MD5 |
4fa852daea4414ae1d6ed50685852e0c
|
|
| BLAKE2b-256 |
8c65c4e9865d923ef8579ba26e9972cce0cd488226d0e1f2e17ebeec5522000c
|