Skip to main content

rn-forge-sqlalchemy

Documentation · Changelog · Source · All pykit packages

Async SQLAlchemy building blocks that match the rn-forge-web wire: audit and version columns, a bulk upsert for imports, and keyset pagination over web's opaque page token.

Module What it holds
models Base (Alembic naming convention), UTCDateTime, AuditMixin (create_time, update_time, created_by, updated_by), VersionMixin
concurrency update_versioned — optimistic concurrency, raising rn_forge.web.VersionConflict (412)
upsert upsert — create or update rows by natural key, counting created, updated and skipped
pagination keyset, next_page_token — AIP-132 orderBy and AIP-158 tokens over a Select

Everything works on PostgreSQL and SQLite, through AsyncSession only.

Where it sits

commons ──► web ──► sqlalchemy      (this package)
              ├───► django
              └───► fastapi

It depends on rn-forge-web and SQLAlchemy. It imports neither rn_forge.fastapi nor rn_forge.django, nor either framework; uv run lint-imports proves it. An application wires this package to its framework itself: the FastAPI guide shows the import and list endpoints.

Installation

Require the packages by version range:

dependencies = [
  "rn-forge-sqlalchemy>=0.2,<0.3",
  "rn-forge-web>=0.3,<0.4",
]

Application code catches rn_forge.web.VersionConflict and passes rn_forge.web pagination terms, so declare rn-forge-web as well.

No database driver is declared. Add asyncpg for PostgreSQL or aiosqlite for SQLite.

Testing

uv run pytest packages/rn-forge-sqlalchemy
RN_FORGE_TEST_POSTGRES_DSN=postgresql+asyncpg://user:pw@localhost/db \
  uv run pytest packages/rn-forge-sqlalchemy -m postgres

The default run uses SQLite. Tests marked postgres run only when the DSN is set.

Not included

The SQL idempotency store, session and unit-of-work helpers, readiness checks and multi-tenant scoping wait for an application that needs them.

Metadata

Release files for rn-forge-sqlalchemy 0.2.2

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

Source distribution (sdist)

Source distribution for rn-forge-sqlalchemy 0.2.2
File Size Uploaded Provenance Actions
rn_forge_sqlalchemy-0.2.2.tar.gz 10.0 kB With provenance Details for rn_forge_sqlalchemy-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rn-forge-sqlalchemy 0.2.2
File Interpreter ABI Platform Actions
rn_forge_sqlalchemy-0.2.2-py3-none-any.whl Python 3 none any Details for rn_forge_sqlalchemy-0.2.2-py3-none-any.whl

Total release size: 21.7 kB

Release files / rn_forge_sqlalchemy-0.2.2.tar.gz

Download URL rn_forge_sqlalchemy-0.2.2.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
06f425393a0de469c92a387d40f50bd8886067c9bad3f91e0098fab2ae34dfdd
BLAKE2b-256 checksum
How to use checksums
677c42a762fc83c6a34113b08d19bb4c9b8f6e53a74d02e7c9ff7306589cf20b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / rn_forge_sqlalchemy-0.2.2-py3-none-any.whl

Download URL rn_forge_sqlalchemy-0.2.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14782de1d3264f13ba2891c97bf8b9e571f30017a97162dbb11be85728f8a417
BLAKE2b-256 checksum
How to use checksums
229fd8edcb1fd55f4011d84700abd23e56365fac1828318a15b81bfb51cfa935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","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}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for rn-forge-sqlalchemy 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rn_forge_sqlalchemy-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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