
Django-Bolt
Faster than FastAPI. Still Django.¶
A Rust server runs your typed async handlers. Your models, Admin and middleware keep working. 311,000 requests a second, measured.
pip install django-bolt
runbolt replaces gunicorn, uvicorn and the process manager311k measured with 8 processes, C=100, Ryzen 5 5600G, loopback. See Benchmarks for conditions and how to reproduce.
Your first endpoint¶
from django_bolt import BoltAPI
api = BoltAPI()
@api.get("/users/{user_id}")
async def get_user(user_id: int):
return {"user_id": user_id}
Add django_bolt to INSTALLED_APPS, run the command above, and open http://localhost:8000/docs for interactive API docs. Follow the Quick Start for the full walkthrough.
Why Django-Bolt¶
Rust speed, Python code¶
Actix Web and Tokio serve every request. Auth, guards, CORS, rate limiting and compression run in Rust before the GIL.
Typed validation¶
Parameters and bodies are validated from type hints with msgspec. One msgspec.Struct gives you validation, serialization and OpenAPI.
All of Django¶
Return a QuerySet and it is evaluated and serialized for you. Models, migrations, signals, sessions and third-party apps work unchanged.
Authentication built in¶
JWT, API key and session auth, with guards such as IsAuthenticated and Requires. Evaluated natively in Rust.
OpenAPI by default¶
Swagger UI, Redoc, Scalar, RapiDoc and Stoplight Elements are served at /docs. Schema comes from your type hints.
Streaming, WebSocket, MCP¶
Server-Sent Events, WebSocket handlers, ASGI mounts and an MCP server for LLM clients via bolt-mcp.
More examples¶
Where to go next¶
Quick Start Build and run your first API in a few minutes.
Deployment Run multiple processes and put Bolt behind a proxy.
How it works Request flow from Rust to your handler and back.
Comparison Django-Bolt vs Django Ninja, DRF, FastAPI and Litestar.
FAQ Production readiness, WSGI, gunicorn, admin and ORM support.
API Reference
BoltAPI, responses, exceptions, auth and settings.