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 |
sqlite |
create_sqlite_engine — an async SQLite engine with WAL, foreign keys, busy timeout and synchronous set on every connection |
migrate |
run_migrations — Alembic upgrade from inside the process; needs the migrations extra and is imported directly, not from the facade |
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.
run_migrations needs the migrations extra:
rn-forge-sqlalchemy[migrations]>=0.2.3,<0.3.
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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rn_forge_sqlalchemy-0.2.3.tar.gz | 12.2 kB | With provenance | Details for rn_forge_sqlalchemy-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rn_forge_sqlalchemy-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for rn_forge_sqlalchemy-0.2.3-py3-none-any.whl |
Total release size: 26.7 kB
Release files / rn_forge_sqlalchemy-0.2.3.tar.gz
| Download URL | rn_forge_sqlalchemy-0.2.3.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0acbab15b3edc4df24e013542cbb18b4ace053dedbff40fddd89138e874b95fb
|
|
BLAKE2b-256 checksum How to use checksums |
4d8fe7b45533345d9b0b776a4f84740011eecb502cc9f4c718150586eb01a9aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 Nov 14, 2026.
Transparency logRelease files / rn_forge_sqlalchemy-0.2.3-py3-none-any.whl
| Download URL | rn_forge_sqlalchemy-0.2.3-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe0058cbc5afb3637fe38127004ae75435c833fbcfd6bc69fea1bd80260032c7
|
|
BLAKE2b-256 checksum How to use checksums |
a045ca6d30d068e2278d86f5bcc399f4f652d8a285ca63823894146a96b0cd82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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 Nov 14, 2026.
Transparency logSecurity for rn-forge-sqlalchemy 0.2.3
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.
Attestation for rn_forge_sqlalchemy-0.2.3.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 Nov 14, 2026.
Transparency logA 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.