Frequently asked questions¶
Short, direct answers. Each answer links to the page with the full detail.
Is Django-Bolt a stripped-down version of Django?¶
No. Django-Bolt removes nothing from Django. It replaces the HTTP server and the API layer — the part that WSGI/ASGI servers, DRF, or Django Ninja would otherwise handle — with a Rust server (Actix Web) and a typed, msgspec-based routing layer. Everything else is the same Django you already run:
| Django feature | In Django-Bolt | Notes |
|---|---|---|
| Django ORM | ✅ Full | Sync and async (aget, afilter, …); return a QuerySet from an async handler and Bolt evaluates it on a bounded thread pool. Async ORM |
| Django Admin | ✅ Full | Auto-mounted from INSTALLED_APPS; served by runbolt, no second server. |
| Django middleware | ✅ Full | BoltAPI(django_middleware=True) runs your settings.MIDDLEWARE stack (sessions, CSRF, auth, messages, CSP…) on API routes. Middleware |
| Django auth / sessions | ✅ Full | JWT and API-key backends are built in (validated in Rust); with django_middleware=True, Django's SessionMiddleware + AuthenticationMiddleware populate request.user / request.session exactly as in Django. Authentication |
| Django signals | ✅ Full | request_started, request_finished, and model signals fire. Signals |
| Django settings / apps | ✅ Full | Same settings.py, INSTALLED_APPS, manage.py. |
| Static & media files | ✅ Full | Served natively from Rust — no WhiteNoise. Static files |
| Third-party Django apps | ✅ Full | Anything that plugs into Django's ORM, admin, or middleware works. |
| Templates / server-rendered views | ✅ | Existing Django URLconf views run through the ASGI mount alongside API routes. ASGI mounts |
The performance comes from where work runs (routing, auth, guards, CORS, rate limiting, compression in Rust without the GIL) — not from removing features. Django middleware is opt-in per API (BoltAPI(django_middleware=True)); the example project used for the published benchmarks runs the admin and sessions but not settings.MIDDLEWARE on Bolt routes.
Does Django-Bolt use WSGI? Is it synchronous?¶
No WSGI, no ASGI server, not sync-only. Django-Bolt ships its own HTTP server: Actix Web on the Tokio runtime, called from python manage.py runbolt. Handlers are async def (sync def is also supported). Requests flow HTTP → Rust → your Python handler via PyO3, with no WSGI or ASGI protocol layer in between. See How Django-Bolt works.
Do I need gunicorn or uvicorn?¶
No. runbolt is the production server. It runs multiple processes with SO_REUSEPORT kernel load balancing, recycles workers by RSS or lifetime, respawns on crash, and drains WebSockets on shutdown. See Deployment.
Is Django-Bolt production ready?¶
Django-Bolt is used in production, publishes a benchmark suite and regression gate for every release, and has a full test suite covering routing, auth, middleware, ORM, streaming, WebSockets, and multi-process behavior. It is pre-1.0, so minor releases can still change APIs; the changelog lists every breaking change.
How fast is Django-Bolt?¶
On a 12-core desktop (Ryzen 5 5600G, 8 processes, C=100, loopback) Django-Bolt serves ~311,000 requests/second on a JSON hello-world, ~187,000 req/s for a 10 KB JSON response, and ~21,000–27,000 req/s for a 10-row Django ORM query on SQLite. It is faster than FastAPI, Robyn, and — on 10 KB payloads — faster than Bun-based Elysia and Hono. Numbers, conditions, and reproduction commands are on the Benchmarks page.
How does Django-Bolt compare to Django Ninja and Django REST Framework?¶
All three run inside a Django project. DRF and Django Ninja are Python view layers that still need gunicorn/uvicorn; Django-Bolt replaces the server with Rust and moves auth, guards, and middleware out of Python. Bolt's syntax is closest to Django Ninja/FastAPI (type-hinted function handlers) and it also provides DRF-style ViewSet/ModelViewSet classes. Full grid: Comparison.
How does Django-Bolt compare to FastAPI and Litestar?¶
FastAPI and Litestar are standalone ASGI frameworks — you bring your own ORM, admin, auth, and migrations. Django-Bolt gives you the same type-hinted handler style plus the whole Django stack, and serves requests faster because the HTTP layer is Rust. See Comparison.
Can I migrate from DRF or Django Ninja incrementally?¶
Yes. Add django_bolt to INSTALLED_APPS, create an api.py, and move one endpoint at a time. Existing Django URLconf views (including DRF/Ninja routes) keep working through the ASGI mount while you migrate.
Does Django-Bolt support WebSockets, SSE, and streaming?¶
Yes — WebSockets, Server-Sent Events, and streaming responses are built in and served by the Rust layer.
Does Django-Bolt generate OpenAPI docs?¶
Yes. Swagger UI, ReDoc, Scalar, RapiDoc, and Stoplight Elements are served at /docs by default. See OpenAPI.
Which Python and Django versions are supported?¶
Python 3.12, 3.13, 3.14 (CPython and PyPy), and the free-threaded build of CPython 3.14 (3.14t). Django 5.2 (LTS), 6.0, 6.1. See Free-threaded Python.
Why does runbolt hang on macOS when it connects to PostgreSQL?¶
This affects local development on macOS with libpq (psycopg). A forked runbolt worker can hang when it opens a PostgreSQL connection. Workers fork with --processes 2 or more, and with a worker recycling option (--max-rss, --workers-lifetime, --respawn-failed-workers). When libpq is built with GSSAPI support, the libpq option gssencmode is prefer by default. With prefer, libpq calls the macOS Kerberos (GSS) framework on each TCP connection. That framework is not safe to use after fork(). A libpq build without GSSAPI support does not call the framework, so this cause does not apply to it.
To prevent the hang, disable GSSAPI encryption. Set the environment variable before you start the server:
Alternatively, set the connection option in DATABASES:
# settings.py
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
# ...
"OPTIONS": {"gssencmode": "disable"},
}
}
This setting turns off GSSAPI encryption only. If the connection must be encrypted, use TLS with sslmode (for example verify-full). A server that accepts only GSSAPI-encrypted connections refuses the connection with this setting. Linux does not need this setting.