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 or
macOS. Wheels are published for both builds on x86-64 and ARM; anywhere else
pip builds from source, which needs a Rust toolchain. Windows is not
supported yet; WSL2 works in the meantime.
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.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oxbrook-0.1.0.tar.gz | 194.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| oxbrook-0.1.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.1.0-cp314-cp314t-manylinux_2_28_aarch64.whl | CPython 3.14 | CPython 3.14 free-threading | Linux glibc 2.28+ ARM64 | Details |
| oxbrook-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 free-threading | macOS 11.0+ ARM64 | Details |
| oxbrook-0.1.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.1.0-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| oxbrook-0.1.0-cp314-cp314-manylinux_2_28_aarch64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ ARM64 | Details |
| oxbrook-0.1.0-cp314-cp314-macosx_11_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 11.0+ ARM64 | Details |
| oxbrook-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl | CPython 3.14 | CPython 3.14 | macOS 10.15+ x86-64 | Details |
Total release size: 14.6 MB
Release files / oxbrook-0.1.0.tar.gz
| Download URL | oxbrook-0.1.0.tar.gz |
|---|---|
| Size | 194.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79985e7ab05203177094fcb2ab832b9f98bafdbc4a64c312c0e4d10a2ee1510d
|
|
BLAKE2b-256 checksum How to use checksums |
a3e636ece029048ab03f43f2c1a183df8687a29b19a01d5f2075fa4bfeba56d9
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | oxbrook-0.1.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 |
a4d84cf2dd91bb6d849b8114ce58eab5a93982eb789f441152553b45ff5b4723
|
|
BLAKE2b-256 checksum How to use checksums |
c822860ea138b50b4d5f9782caf3ce19bfb5df2c7f15d95840b7376b817befeb
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314t-manylinux_2_28_aarch64.whl
| Download URL | oxbrook-0.1.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 |
5538c6d696ab5a9641f5eee6643437f35acf1e53e64a470a270bd6dd98cbbdb4
|
|
BLAKE2b-256 checksum How to use checksums |
a95b73ecf85ea33eaef21067d18d7a3f2bfd46b69e8c08b717c0344fd44f6e6b
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | oxbrook-0.1.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 |
61d8506f7599aced90114d7d8539f200e52c645ad9455aaa3f7adb4fadd9949d
|
|
BLAKE2b-256 checksum How to use checksums |
53aa05589dc875a66a94017dd7afda368dfd2a8abbd7176e766085eb7ec9b8f2
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314t-macosx_10_15_x86_64.whl
| Download URL | oxbrook-0.1.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 |
c636b745a9c9648b6826e06322d58398a9b3c639b88846d3b672cfaacb2d6bf1
|
|
BLAKE2b-256 checksum How to use checksums |
158216a307f5c62acf9d92b6831396dd6553dac1c315023eb2540adf4ab778a6
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | oxbrook-0.1.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 |
903179f21f4f76146e8c42c09ffea8323851a8ac81d2e1ab56a1c84a10125be9
|
|
BLAKE2b-256 checksum How to use checksums |
53dde36bef12af727bb0b366406da28760c82a77b3c0ef5c029c4ec0e4d4640c
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314-manylinux_2_28_aarch64.whl
| Download URL | oxbrook-0.1.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 |
d4a2c5c2e75717beeed2cbc91d2c875a8b697ea78644d29eeb65f342e03c8063
|
|
BLAKE2b-256 checksum How to use checksums |
7ccb3359fe9bc4ec93f7adb4f6480031e299ffe36e79e1609b82c328e754b435
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | oxbrook-0.1.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 |
3fb747d70975e11414cba09a74fc96986c3c1d7a02ac73c5f03869470ec88116
|
|
BLAKE2b-256 checksum How to use checksums |
79d1a3af46805f0e2a1108728fe34c629ec2e33c9b65f1107a5f93a5bed2acc8
|
| 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 16, 2026.
Transparency logRelease files / oxbrook-0.1.0-cp314-cp314-macosx_10_15_x86_64.whl
| Download URL | oxbrook-0.1.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 |
c8b1e7b3ab1f894783ea0f3cef701fb3d5ac4336d95865219e4c9141f919ea73
|
|
BLAKE2b-256 checksum How to use checksums |
e4ff6a1e99185b3a606b81c1d550a837fea97edac94f3ac04c98701e7070f043
|
| 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 16, 2026.
Transparency log