Skip to main content

Oxbrook

A fast Python REST framework with a Rust core, built-in reactive streams, and agent-native interfaces.

pip install oxbrook
# main.py
from oxbrook import App, Request

app = App()

@app.get("/")
async def hello(_: Request):
    return {"hello": "world"}
oxbrook run main:app --reload

Documentation: ishangavidusha.github.io/oxbrook

Status

Alpha. Every feature below is covered by the test suites on both CPython 3.14 builds, but the API is not settled. While the version is 0.x, a minor release (0.2.0) may change the API and a patch release (0.1.1) does not; every change that breaks code is listed in the changelog. This is a personal project, not a supported product.

Requires CPython 3.14, free-threaded (python3.14t) or standard, on Linux, macOS or Windows. Wheels are published for both builds: x86-64 and ARM on Linux and macOS, and x86-64 on Windows. Anywhere else pip builds from source, which needs a Rust toolchain. Windows is supported so that the framework can be tried and developed against on the machine in front of you; what is measured, and what the performance page reports, is Linux and macOS.

What it does

REST. A radix-tree router per HTTP method, with path and query parameters typed by the handler's annotations and coerced in Rust. A request that cannot succeed is answered before a Python worker is woken. Pydantic request and response bodies, forms and multipart uploads parsed in Rust, request bodies larger than memory with backpressure, static files, routers, middleware, exception handlers, dependency injection with teardown, lifespans, signed cookie sessions, CORS, and OpenAPI 3.1 from the same route metadata the router uses. Authentication with one auth= declaration — API keys, bearer tokens, JWT, OpenID Connect providers, Basic, sessions or a scheme of your own — enforced before the body is read, on HTTP, WebSockets and agent tool calls alike, and logging people in through Google, Microsoft, GitHub or any OpenID Connect provider.

Serving. HTTP/1.1 and HTTP/2, HTTPS, bounded concurrency with 503 rather than an unbounded backlog, request timeouts, handlers cancelled when their client leaves, graceful shutdown on SIGTERM, and an oxbrook command with reload for development.

Streams. Named topics with fan-out and four backpressure policies. Subscribers on every worker loop in the process receive every message, which free-threaded CPython makes possible. SSE(...) and @app.websocket(...) hand a topic to a client. App(redis_url=...) makes a topic durable: persisted, replayable, shared across processes, with consumer groups for work that must not be lost.

Agents. tool=True on a route also exposes it over the Model Context Protocol at /mcp, with its name, description and schemas taken from the handler that already exists. Opt-in, so a route is not agent-callable until someone decides it should be.

Performance

hello world, free-threaded 3.14 req/s
oxbrook 181,397
granian, raw ASGI 135,846
granian + FastAPI 29,674
uvicorn + FastAPI 12,411

Apple Silicon, 10 cores, 64 connections. A CPU-bound handler gains 3.15x on four worker loops on the free-threaded build, against 1.03x on the GIL build.

Hello world measures dispatch, not a framework. The performance page has the method, the machine, what each feature costs, and what has not been measured.

How it works

A tokio thread parses a request, matches it against a radix tree, coerces its parameters, and pushes a plain Rust struct onto a worker's bounded queue without touching the interpreter. It writes one byte to a socketpair only if no wakeup is already in flight, so a burst of requests collapses into a single wakeup, and each worker's asyncio loop schedules every queued handler in one callback. See internals.

Contributing

Building from source, running the suites and the project's conventions are in CONTRIBUTING.md.

License

MIT.

Metadata

Release files for oxbrook 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 oxbrook 0.3.0
File Size Uploaded
oxbrook-0.3.0.tar.gz 323.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for oxbrook 0.3.0
File
oxbrook-0.3.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
oxbrook-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
oxbrook-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
oxbrook-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
oxbrook-0.3.0-cp314-cp314t-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.15+ x86-64 Details
oxbrook-0.3.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
oxbrook-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
oxbrook-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
oxbrook-0.3.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
oxbrook-0.3.0-cp314-cp314-macosx_10_15_x86_64.whl CPython 3.14 CPython 3.14 macOS 10.15+ x86-64 Details

Total release size: 18.9 MB

Release files / oxbrook-0.3.0.tar.gz

Download URL oxbrook-0.3.0.tar.gz
Size 323.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1c257021133e44d25e434b13c7202143dabdb28408d33da8c6536d2753e522b2
BLAKE2b-256 checksum
How to use checksums
61a13397970b2ba8740dd61e5b8a1200a84f0161c193aa88ed4b2b03fdec003b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314t-win_amd64.whl

Download URL oxbrook-0.3.0-cp314-cp314t-win_amd64.whl
Size 1.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
5eba678be0f74786c172a8926c0bff4660032845e997661a1af2e3959bbb0367
BLAKE2b-256 checksum
How to use checksums
ad40a262948fb7011f81b921be3188c682581fd54fa2661c68d092884ea93bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL oxbrook-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b722b5e009766499ca93128cf4da4a85274d513b42d48dd4d96abaef1b671c70
BLAKE2b-256 checksum
How to use checksums
0e34017d6b584fce6930cd1b57fdfe407502f7dfe7bfb0a467aa3ecc20791c96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL oxbrook-0.3.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 1.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
097cb3208c734fd49adb5d677d4845f464d0259c5e588dfaf5287ba833aa1166
BLAKE2b-256 checksum
How to use checksums
255dc1826d0d1936edf66b5f03989fc40822b999e8b3d3e17e547f91746aef14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL oxbrook-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
02b2cabc29370a49e71954e0ef148dc554b4f7dd97634d051eeb65a2f5815bbf
BLAKE2b-256 checksum
How to use checksums
4ff820a7d665e9fd0ad5ba1b401675673cdcf8f34edde3531a8135c5702b723e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314t-macosx_10_15_x86_64.whl

Download URL oxbrook-0.3.0-cp314-cp314t-macosx_10_15_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
bf5793c820f265782f9dd3965f53b2386122e1630d9dabd19262d548d4ea0718
BLAKE2b-256 checksum
How to use checksums
10ce67f687ab6a3793f9584bc39697c77626ff4fd0c2038ed2d461151f831621
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314-win_amd64.whl

Download URL oxbrook-0.3.0-cp314-cp314-win_amd64.whl
Size 1.9 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
53a0d3ad20c4a4ad8919344faa97a60053bab26d08745f4cf8b3e05ac1be21a7
BLAKE2b-256 checksum
How to use checksums
01d696a6be834709bb93605b081a8ed4955bce5c49de3d67490f80e92261c069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL oxbrook-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d21b398f89585f5e916680be148659eeb31fc87bdda375ed4f5dbf304dd45b2f
BLAKE2b-256 checksum
How to use checksums
5218078758124fa9b51d175a0c2725d4c6b97326aaab5ae034d7b2beda1a6810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL oxbrook-0.3.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 1.9 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
cdeddf94c391e5abbfa268fc21700d0aca9c7508627e457673ebc57da923d90c
BLAKE2b-256 checksum
How to use checksums
b8d38d48328cd8826f10941dc1452471895f5445d59489fd0214d693922f8855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL oxbrook-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Size 1.7 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e918ee951337a39fb3d62a0db52dd4ed85de7fd5a39849a5af46bf120cfc3cb5
BLAKE2b-256 checksum
How to use checksums
d9529180054f2570c504a836232154b1028d0f0376c31185fa4f46d1eff4cc26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release files / oxbrook-0.3.0-cp314-cp314-macosx_10_15_x86_64.whl

Download URL oxbrook-0.3.0-cp314-cp314-macosx_10_15_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
b98ba1538aea5480e4d7821258dc9b29cffcb4f7b2b2156ab0c02352fa66473b
BLAKE2b-256 checksum
How to use checksums
146c3f6d99ae65fb2f6c8321fb3fbf5778bb9d5014fd383816e5173562d3ceea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

11 release files

0.2.0

11 release files

0.1.0

9 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