Skip to main content

rn-forge-web

Documentation · Changelog · Source · All pykit packages

Framework-agnostic HTTP/API primitives, built on rn-forge-commons.

These are the wire semantics an application promises its callers — W3C Trace Context propagation, the error body, the precondition contract, the pagination envelope, the idempotency contract, the readiness aggregate, the authentication contract, the OpenAPI naming rules, and the conformance table the framework packages are tested against.

Fourteen flat modules, all one kind of mechanism: inbound HTTP wire semantics.

Where it sits

commons ──► web ──► auth ──► django
              │        └───► fastapi
              └───► sqlalchemy

rn-forge-web depends on rn-forge-commons and nothing else in the workspace. It never imports rn_forge.cli or rn_forge.tooling — those are the command-line and file-owning layers, and a package that ships into an ASGI server has no business reaching either. It never imports a web framework: not django, not fastapi, not starlette, not rest_framework.

.importlinter at the repo root carries the web-is-framework-free and web-layers contracts, and uv run lint-imports proves them.

Inbound, not outbound

The tempting rule is "everything HTTP lives in rn-forge-web", and it is wrong. A circuit breaker, a retry policy and a token bucket are transport-agnostic: a worker retrying a database call, a CLI retrying a blob upload and an LLM adapter backing off all need them, and none of them speaks server-side HTTP. Those live in rn_forge.commons.integration.resilience, so that an Azure Blob or Key Vault adapter package can depend on commons alone rather than dragging ASGI middleware and cursor codecs into a process that serves no requests.

The one concern that runs the other way is problem_from_body, which parses an upstream's application/problem+json back into a ProblemDetail. It takes a parsed mapping and a status — not a response object — precisely so no HTTP client library is pulled in either direction.

What stays in a framework package

Logic that both framework packages need lives here, as framework-free functions: rendering a problem response (render_problem), the field-error entry (field_error), reading the current trace id, parsing an Authorization header, requiring an idempotency key, the liveness body and the OpenAPI problem-response declarations. rn-forge-django and rn-forge-fastapi keep only the code that reads their framework's native shapes (a DRF error tree, a pydantic error list, a Starlette exception) and writes their framework's native response.

Installation

Require the package by version range:

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

Inside this workspace, [tool.uv.sources] overrides the requirement with the local checkout; that override is for local development only and does not survive into a built wheel.

Dependencies and why

rn-forge-commons — AppException (every exception here subclasses it, so a consumer already catching that catches these), through its pydantic extra.

pydantic, through that extra — models.py holds WireModel, the camelCase base, and ProblemDetail, Page[T], CheckResult and HealthReport are WireModel subclasses. Both framework packages use them directly: FastAPI as request and response models, Django for its OpenAPI components and health bodies. rn-forge-django therefore installs pydantic transitively.

secure (2.0.1), behind this package's own security extra — and only for rn_forge.web.security. It is framework-agnostic (no dependencies of its own) and emits the OWASP REST Security Cheat Sheet header preset exactly, so it is wrapped rather than hand-rolled. Behind an extra and excluded from the curated __init__.py so the rest of the package stays dependency-free; import rn_forge.web.security directly.

opentelemetry-api, a base dependency — and only for rn_forge.web.tracing. W3C Trace Context is read through OpenTelemetry's active-span API, following OpenTelemetry's own library guidance: a library depends on the API only, which is a no-op until the application configures the SDK. This package never configures a TracerProvider or an exporter.

Nothing else beyond those. The problem shape, ETag preconditions, cursor pagination, idempotency and health aggregation are implemented here: the maintained libraries for each either depend on a web framework or fix a different wire shape.

Documentation

uv run --directory packages/rn-forge-web --group docs mkdocs build --strict, or the combined site from the repo root. docs/guides/api-conventions.md is the normative wire contract for an application's specification. docs/guides/model-conventions.md compares implemented ORM building blocks and optional application design advice.

Metadata

Release files for rn-forge-web 0.3.0

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-web 0.3.0
File Size Uploaded Provenance Actions
rn_forge_web-0.3.0.tar.gz 56.9 kB With provenance Details for rn_forge_web-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 122.9 kB

Release files / rn_forge_web-0.3.0.tar.gz

Download URL rn_forge_web-0.3.0.tar.gz
Size 56.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6a746982a436ae3eea07f253839ebfc506a64d563127c6dc6387a54f3c1cda75
BLAKE2b-256 checksum
How to use checksums
e5df48ecf6ed0dc5c29d029986f2dcdc75a38c11d898c8f50113a71921b2c2d9
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_web-0.3.0-py3-none-any.whl

Download URL rn_forge_web-0.3.0-py3-none-any.whl
Size 66.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e43aafcf59788aff0834147d26183729e9e3ad9be07abc17c7f841df9a4dc9d7
BLAKE2b-256 checksum
How to use checksums
e8dd88e7d56c813038bc79faabf24bc560158e5b4c10723609a280ee48753e74
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-web 0.3.0

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_web-0.3.0.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