Korvex
A high-performance router for Python, backed by a Rust radix tree — with an optional, equally lightweight ASGI layer for actually hosting it.
Korvex is deliberately small: the core is a router and nothing else. It
matches a path to an opaque handler name; it never calls your code itself.
Everything above that (an ASGI App, Response/Headers helpers, route
groups) is a thin, optional layer built on top — you can use as much or as
little of it as you want.
Why
- Fast routing. A radix tree in Rust, exposed through PyO3, with an
allocation-free matching path (no
Vecof segments, noStringclones for captured params). Benchmarked at 10×–1000× faster route lookups than Flask/Django/Starlette's own routers (seebenches/). - Small surface.
Routerdeals only in opaque strings — a path pattern in, a handler name + params out. It doesn't know what aResponseis, and never will; that keeps the matching engine simple and independently testable (src/router/engine/, zeroPyO3dependency). - Host it or don't.
korvex.Appis a real ASGI application (works with uvicorn, Granian, hypercorn, ...) if you want to actually serve requests — but it's a couple hundred lines of pure Python on top of the router (korvex/app.py), not a requirement.
Install
pip install korvex
# or, to also pull in a server for the ASGI examples:
pip install "korvex[serve]"
Building from source requires maturin and a Rust toolchain — see CONTRIBUTING.md.
Quickstart
from korvex import Router
router = Router()
router.get("/users/{id:int}", "get_user")
router.post("/users", "create_user")
router.match_route("/users/42")
# -> ("get_user", {"id": "42"}, [])
Router never calls your code — match_route just tells you which opaque
handler name matched. Dispatching that to real code is up to you, or use
App to have Korvex do it:
from korvex import App, Response
app = App()
@app.get("/users/{id:int}")
def get_user(request, id):
return Response.json({"id": id})
# uvicorn mymodule:app
See examples/ for the router alone, route groups with
middleware, and the full ASGI app — each one runnable as-is.
Features
- Static, dynamic (
{id}), constrained ({id:int},{id:uuid}), and wildcard (*filepath) path segments - Per-route HTTP methods, with
405 Method Not Allowed(not a bare 404) when a path matches but the method doesn't - Route groups with shared prefixes and middleware (
router.group(...)) - Route introspection (
router.routes()) and removal (router.remove_route(...)) - An optional ASGI
App: decorator-based handler/middleware registration, sync or async, zero extra dependencies - Fully typed (
korvex/py.typed,.pyistubs for the compiledRouter)
Performance
Routing lookups beat Flask/Django/Starlette by 10×–1000× (benches/bench_router.py).
Once wired into a full ASGI app, the framework-level gap narrows — most of
the per-request cost becomes Python-level handler/response work, common to
any framework — but the server you host it with matters far more than the
framework: swapping uvicorn for a Rust-based ASGI server (e.g.
Granian) measured roughly
5× the throughput in this project's own testing, with zero code changes,
since App speaks plain ASGI. See benches/bench_app.py for the
methodology; treat any specific numbers as a starting point for your own
measurements, not a guarantee — they depend heavily on hardware, Python
version, and workload.
Development
git clone https://github.com/3d3n-pyc/korvex
cd korvex
uv run maturin develop --release
uv run pytest
See CONTRIBUTING.md for the full checklist.
License
Metadata
Release files for korvex 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 | Provenance | Actions |
|---|---|---|---|---|
| korvex-0.1.0.tar.gz | 116.2 kB | With provenance | Details for korvex-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| korvex-0.1.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for korvex-0.1.0-cp39-abi3-win_amd64.whl |
| korvex-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for korvex-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| korvex-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for korvex-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| korvex-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for korvex-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
| korvex-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for korvex-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 1.5 MB
Release files / korvex-0.1.0.tar.gz
| Download URL | korvex-0.1.0.tar.gz |
|---|---|
| Size | 116.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0497d0e54b4484cf78a7fb0e5503e6bd8e82cb46a72d96a5e6aff2bc31258a22
|
|
BLAKE2b-256 checksum How to use checksums |
07f4e2c585318ab998ed71b9e6e30013bb4ec87fb4a7544ca5cab97ff577c446
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 22, 2026.
Transparency logRelease files / korvex-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | korvex-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 178.4 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
99da63241075c0c5bdf887e69f456791fe03e0bca374a63e62acdcd4c85627fc
|
|
BLAKE2b-256 checksum How to use checksums |
f96e0da8fda2f3e38e061e8e5e262560a1f941ea62a073bfdc81b1b4e0681afc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 22, 2026.
Transparency logRelease files / korvex-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | korvex-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 323.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c26da8f2ebb80cacd55a88ce29c4f897917f92830cd58518ccfc38c173178c48
|
|
BLAKE2b-256 checksum How to use checksums |
0795d593291432084f69e5b8b4489e9c26102280ae88a7609c8521b6fb6600c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 22, 2026.
Transparency logRelease files / korvex-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | korvex-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 318.2 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
675ec6636653e811d9f9045669c0406428c27527f1e7c905cdd1135741ab1deb
|
|
BLAKE2b-256 checksum How to use checksums |
af61049ae6c122ae8b918062c300151ce14d0c1f0e3f684f0491636ec8db0336
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 22, 2026.
Transparency logRelease files / korvex-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | korvex-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 284.2 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
95dff9e8ac952caf862a203afeef28b6ad1dd2d28e45862ddee19e959e224fd1
|
|
BLAKE2b-256 checksum How to use checksums |
9be18cd448135cdfcfd5c9665ca1a933b9f1cb8bc026243181f597208765347e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 22, 2026.
Transparency logRelease files / korvex-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | korvex-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 284.7 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a07ba8346ce841182e068a887a7199612fba6937da1ed96164aeaae278a677e
|
|
BLAKE2b-256 checksum How to use checksums |
454d9d9a3a76e5342162db5d2aa7fa65023f1102cbf997d834edc690aded839b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.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 Jul 22, 2026.
Transparency logSecurity for korvex 0.1.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
All 6 files in this release have been uploaded with provenance metadata.
Attestation for korvex-0.1.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 Jul 22, 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.