Skip to main content

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 to serializer.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))

Metadata

Release files for skir-sqlalchemy 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skir-sqlalchemy 0.1.1
File Size Uploaded
skir_sqlalchemy-0.1.1.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skir-sqlalchemy 0.1.1
File Interpreter ABI Platform
skir_sqlalchemy-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.6 kB

Release files / skir_sqlalchemy-0.1.1.tar.gz

Download URL skir_sqlalchemy-0.1.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
67f1c81ea488e665c8b7a7bc01256de71679fd0c0b231485fe53403ec11c7290
BLAKE2b-256 checksum
How to use checksums
fe2153dd5d881f56a5e03046e41c3b0a22763b8c04e1bafdba640f9e57a0255d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / skir_sqlalchemy-0.1.1-py3-none-any.whl

Download URL skir_sqlalchemy-0.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e87c99854ac594bf69fa5fd1b024cb7eb801f0bcc6dfcf33b9a61bfe0c90293f
BLAKE2b-256 checksum
How to use checksums
8c65c4e9865d923ef8579ba26e9972cce0cd488226d0e1f2e17ebeec5522000c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page