Blazing fast async HTTP framework for Python. Built on asyncio with uvloop.
- 3-4x faster than FastAPI on benchmarks
- Familiar decorator-based routing (like FastAPI/Flask)
- Middleware support (request + response)
- Path parameters with regex matching
- Zero-copy request parsing
from nexus import Nexus
app = Nexus(title="My API")
@app.get("/")
async def index(request):
return {"message": "Hello World"}
@app.get("/users/{user_id}")
async def get_user(request, user_id: str):
return {"user_id": user_id}
app.run(port=8000)| Endpoint | Nexus | FastAPI | Starlette |
|---|---|---|---|
| JSON | 142K/s | 48K/s | 52K/s |
| Plaintext | 198K/s | 61K/s | 68K/s |