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.

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.2.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.2.0
File Size Uploaded
oxbrook-0.2.0.tar.gz 202.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for oxbrook 0.2.0
File
oxbrook-0.2.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
oxbrook-0.2.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.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
oxbrook-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
oxbrook-0.2.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.2.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
oxbrook-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
oxbrook-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
oxbrook-0.2.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
oxbrook-0.2.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.1 MB

Release files / oxbrook-0.2.0.tar.gz

Download URL oxbrook-0.2.0.tar.gz
Size 202.9 kB
Tags Source
SHA-256 checksum
How to use checksums
882905d6687127dd7dabf9e6eb876e30d7d10a716bdccddc58e016ff32e114ea
BLAKE2b-256 checksum
How to use checksums
1f7955cbcd4a5eb9fe3cfc641e9abb9d0cad801b0fd035f77dad58355ff8ece1
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.0-cp314-cp314t-win_amd64.whl
Size 1.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
b0c0caecd4a589b0d25fb4d226b09569ae39ab02ff86de46d1eab5033dfa99e9
BLAKE2b-256 checksum
How to use checksums
cc5eff147a64cfdf15fd27cb7a0a1795f469e1809658d03ca1a248b68a854053
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.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
347dfd964e3b7d97c410285964e0fd626f35f271a3c05219c7c9f7262bc12962
BLAKE2b-256 checksum
How to use checksums
8db6074b81a74a2d5f5161a615a208b23c9d44c8466139fe858bbd1629ae821b
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ad5784d44dff5efe24196a1b702a2f90386e6779ce1052742565624dfda39f37
BLAKE2b-256 checksum
How to use checksums
942a36bbaa60c634e80ef98f1db264fcad20628ad335c645fede411ff6d54d1b
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.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
44409602c205b53eb3ed141d3b9fc53547cb81fedaf97f7db0be3862ce215d0a
BLAKE2b-256 checksum
How to use checksums
05bbde258cbeb9136267a72b92baac795ae97cd2ca2fcaa7e5b2c43b532a9d11
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.0-cp314-cp314t-macosx_10_15_x86_64.whl
Size 1.8 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
6cff7cb07403da1e4d1894e094d900927d3f03e688bb2561ad46b326389c5e6b
BLAKE2b-256 checksum
How to use checksums
f0b9a0167c9f581b0db0df5f507f3d2998777d01a89f62c2d3d825923218745c
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.0-cp314-cp314-win_amd64.whl
Size 1.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
30c4b5282a0a166d106d6e9c34da0e1d76fb5d9cc01ecf6b6a515a999c00562f
BLAKE2b-256 checksum
How to use checksums
d8e5b142ed6d37cd3a2e886029ce2ea63a74108b0f8089addfa109ed6f8a27f6
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.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
0714bd50d6d46b7492fb609b18bb5256369a9c11d6ac11355bc84c087fc20f1f
BLAKE2b-256 checksum
How to use checksums
dde66ea8e41e23ccaab1fb1c647594a38727cacfdf8ee5f5107af74124091a11
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 1.8 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
c4c44b6cf6a3d6fb96f89e4eba9068539c45fe47e27c685f2a49bfac70c3f6f6
BLAKE2b-256 checksum
How to use checksums
db46a47feaedf3753948885ccd70ca49b4ec9e904680d41c85c268252c099a51
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.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
b7904be45a404e8a0d07564d9c01df13fb4676d42ef16a4cf444442eaf09471c
BLAKE2b-256 checksum
How to use checksums
96ad8636c8f274d17fbc49ba8c6d328ed59c8c45e47ca878a00370feba84fc88
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 Sep 21, 2026.

Transparency log

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

Download URL oxbrook-0.2.0-cp314-cp314-macosx_10_15_x86_64.whl
Size 1.8 MB
Tags CPython 3.14 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
2a5aff3b9eadd733e4d52c6636fc29c68c7841d2c9745dd3a73d3fb098b40b5f
BLAKE2b-256 checksum
How to use checksums
690024df1907f7aecb550f80f29bcffb59f4fc36b3e9815c42f61a18a89f4813
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 Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

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