This release is a pre-release and may not be stable for production use.
The fastest Python web framework — built on Django
Rust-powered HTTP, msgspec serialization, full type validation —
with the Django ORM, Django Admin, and every Django package you already use.
Documentation · Quick Start · Features · Benchmarks · Video Tutorial · Discord
Django-Bolt is the fastest Python web framework: 300k+ requests/second on a single 12-core desktop (8 processes, C=100, loopback), ahead of FastAPI and Robyn, and even of Bun-based JavaScript frameworks (Elysia, Hono) on JSON payloads. It is a fully typed API framework for Django. It serves your endpoints from a Rust HTTP server (Actix Web + Tokio), bridges to your Python handlers with PyO3, and serializes with msgspec — while everything you love about Django (ORM, Admin, auth, middleware, signals, third-party apps) keeps working out of the box.
Think Django REST Framework or Django Ninja, with a Rust engine underneath and no gunicorn or uvicorn required.
from django_bolt import BoltAPI
api = BoltAPI()
@api.get("/hello/{name}")
async def hello(name: str):
return {"message": f"Hello, {name}!"}
python manage.py runbolt --dev
✨ Why Django-Bolt?
| ⚡ Rust speed, Python ergonomics | HTTP parsing, routing, auth, guards, CORS, rate limiting, and compression run in Rust without touching the GIL. Your handlers stay plain Python. |
| 🐍 100% Django | Use your existing models, settings.py, INSTALLED_APPS, Django Admin, middleware, and signals. Migrate one endpoint at a time from DRF. |
| 🧷 Fully typed | Type hints drive path/query/header/cookie/form/body extraction and validation. msgspec.Struct and Bolt Serializer return types are validated on the way out. |
| 🚀 Deploy directly | runbolt is the production server: multi-process with SO_REUSEPORT, worker recycling, graceful shutdown, static & media serving. |
| 📚 Batteries included | OpenAPI docs (Swagger, ReDoc, Scalar, RapiDoc, Stoplight), JWT/API-key auth, guards, pagination, ViewSets, WebSockets, SSE, streaming, testing client, MCP servers. |
🚀 Quick Start
1. Install
pip install django-bolt # or: uv add django-bolt
2. Add to INSTALLED_APPS
# myproject/settings.py
INSTALLED_APPS = [
...,
"django_bolt",
]
3. Write your first endpoint
Create an api.py next to your settings.py (or inside any Django app — Bolt autodiscovers them all):
# myproject/api.py
import msgspec
from django.contrib.auth import get_user_model
from django_bolt import BoltAPI
User = get_user_model()
api = BoltAPI()
class UserSchema(msgspec.Struct):
id: int
username: str
@api.get("/users/{user_id}")
async def get_user(user_id: int) -> UserSchema: # response is type-validated
user = await User.objects.aget(id=user_id) # Django ORM, no extra setup
return {"id": user.id, "username": user.username}
4. Run
python manage.py runbolt --dev # auto-reload for development
python manage.py runbolt --processes 4 # production: multi-process, no gunicorn/uvicorn
Your API is live at http://localhost:8000/users/1 and interactive docs at http://localhost:8000/docs.
📖 Next: the Quick Start guide → Deployment → Topic guides.
🧭 A tour of the API
Request validation with type hints
import msgspec
from typing import Annotated
from django_bolt import BoltAPI
from django_bolt.param_functions import Header
api = BoltAPI()
class CreateUser(msgspec.Struct):
username: str
email: str
@api.post("/users", status_code=201)
async def create_user(
user: CreateUser, # JSON body → validated struct
api_key: Annotated[str, Header("x-api-key")], # header
page: int = 1, # query param with default
):
return {"username": user.username, "page": page}
Authentication & guards (evaluated in Rust)
from django_bolt.auth import JWTAuthentication, IsAuthenticated, Requires
IsStaff = Requires("is_staff", True)
@api.get("/admin/stats", auth=[JWTAuthentication()], guards=[IsAuthenticated(), IsStaff])
async def admin_stats(request):
return {"user_id": request.user.id}
JWT signature checks, expiry, API-key lookup, and guard evaluation all happen before the GIL is ever taken.
Serializers & ModelViewSet
from django_bolt import ModelViewSet, PageNumberPagination
from django_bolt.serializers import Serializer
from myapp.models import Article
class ArticleSchema(Serializer):
id: int
title: str
content: str
class Config:
field_sets = {"list": ["id", "title"]}
@api.viewset("/articles")
class ArticleViewSet(ModelViewSet):
queryset = Article.objects.all()
serializer_class = ArticleSchema
pagination_class = PageNumberPagination
One Serializer class, many projections — no more UserListSerializer / UserDetailSerializer / UserAdminSerializer sprawl.
WebSockets & Server-Sent Events
from django_bolt import WebSocket, StreamingResponse
@api.websocket("/ws/echo")
async def echo(websocket: WebSocket):
await websocket.accept()
async for message in websocket.iter_text():
await websocket.send_text(f"Echo: {message}")
@api.get("/events")
async def events():
async def stream():
for i in range(10):
yield f"data: tick {i}\n\n"
return StreamingResponse(stream(), media_type="text/event-stream")
MCP servers for LLM clients
from bolt_mcp import MCP # pip install "django-bolt[mcp]"
mcp = MCP("my-server")
@mcp.tool
async def add(a: int, b: int) -> dict:
return {"sum": a + b}
api.mount_mcp(mcp)
Expose tools, resources, and prompts over MCP Streamable HTTP, backed by the official Rust SDK.
Middleware: CORS, rate limiting, compression
from django_bolt.middleware import cors, rate_limit
@api.get("/public")
@cors(origins=["https://example.com"])
@rate_limit(rps=100, burst=200)
async def public():
return {"ok": True}
Django middleware (sessions, messages, CSRF, your own) is supported too.
📦 Features
| Feature | Description |
|---|---|
| ⚡ High Performance | Actix Web + Tokio + PyO3, zero-copy routing, sync-dispatch bypass for simple handlers |
| 🔐 Authentication | JWT, API key, and Django session auth — validated in Rust |
| 🛡️ Permissions & Guards | IsAuthenticated, AllowAny, and claim-based Requires(...) guards |
| 🎛️ Middleware | CORS, rate limiting, compression, Django middleware integration |
| 📦 Serializers | msgspec-based validation with field sets, computed fields, and model integration |
| 🗄️ Async ORM | Return QuerySets from async handlers; bounded, vendor-aware ORM executor |
| 📡 Responses | JSON, HTML, redirects, files, streaming, SSE |
| 🔌 WebSockets | FastAPI-style WebSocket handlers on Rust infrastructure |
| 📚 OpenAPI | Auto-generated schema with Swagger, ReDoc, Scalar, RapiDoc, and Stoplight UIs |
| 🧱 Class-Based Views | APIView, ViewSet, ModelViewSet, @action |
| 📄 Pagination | PageNumber, LimitOffset, and Cursor pagination |
| 💉 Dependency Injection | Depends(...) with registration-time graph resolution |
| 🤖 MCP Servers | Tools, resources, prompts, and streaming over MCP Streamable HTTP |
| 🗂️ Static & Media Files | Native Rust static/media serving — no WhiteNoise needed |
| 🔗 ASGI Mounts | Mount existing ASGI apps under a prefix |
| 🩺 Health, Logging, Lifespan | Health endpoints, structured logging, lifespan hooks, signals |
| 🧪 Testing | In-process TestClient that runs the full Rust pipeline |
| 🧬 Nanodjango | Single-file Django apps |
All runtime settings and environment variables are listed in the Settings reference.
Measured performance, conditions, and reproduction steps are on the Benchmarks page.
🏗️ How it works
HTTP request
│
▼
Actix Web (Rust) ── routing (matchit) ── CORS · rate limit · compression
│
▼
Auth & guards (Rust, no GIL) ── JWT / API key / session · IsAuthenticated · Requires(...)
│
▼
Dispatch ── sync fast path (single GIL block) or async path (persistent worker loop)
│
▼
Your handler ── typed params · Depends(...) · Django ORM
│
▼
msgspec serialization ── zero-copy body ── HTTP response
🚢 Deployment
python manage.py runbolt --host 0.0.0.0 --port 8000 --processes 4
python manage.py runbolt --processes 4 --max-rss 512 # recycle workers above 512 MB
Multi-process scaling uses SO_REUSEPORT for kernel-level load balancing. Worker recycling, crash respawn, graceful shutdown, and WebSocket drain are built in. See the Deployment guide for systemd, supervisor, and reverse-proxy setups.
🤝 Contributing
Contributions are welcome! See CONTRIBUTING.md for the development setup (Rust toolchain, uv, just), the test workflow, and pull request guidelines.
git clone https://github.com/dj-bolt/django-bolt.git && cd django-bolt
uv sync && just build && just test-py
💬 Community
- 📖 Documentation
- 💬 Discord
- 🐛 Issues
- 🎥 Video walkthrough by BugBytes
- 🤖 Ask DeepWiki · for AI assistants: llms.txt
- ❓ FAQ · Comparison vs Ninja / DRF / FastAPI / Litestar · How it works
💖 Sponsors
Support Django-Bolt's development by becoming a sponsor. Your logo will appear here with a link to your website.
Backers
🙏 Acknowledgments
Django-Bolt stands on the shoulders of giants:
- Django REST Framework — ViewSet patterns, permission system, and overall API philosophy
- FastAPI — dependency injection, parameter extraction, and type-hint-driven design
- Litestar — OpenAPI plugin architecture, middleware and guard design
- Robyn — proved the potential of Rust-powered Python web frameworks with PyO3
- Actix Web, PyO3, msgspec, matchit — the foundations that make the speed possible
📄 License
Django-Bolt is released under the MIT License.
Metadata
Release files for django-bolt 0.13.0a1
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 | |
|---|---|---|---|---|
| django_bolt-0.13.0a1.tar.gz | 2.1 MB | Without provenance | Details |
Built distributions (wheels)
Total release size: 58.0 MB
Release files / django_bolt-0.13.0a1.tar.gz
| Download URL | django_bolt-0.13.0a1.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10590d95b1ead1fcbc6f1fe22e91dc37ea8d42500bd4ad821443ef1180eb0f8b
|
|
BLAKE2b-256 checksum How to use checksums |
78458c6b3aac352435d70004225fdc1752d9f7c02340d52bee32b6a10444f09b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp314-cp314t-win_amd64.whl
| Download URL | django_bolt-0.13.0a1-cp314-cp314t-win_amd64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a26294ef756beb9090f0c762e9b2bfaa4f51e1ff1c844dad71c85f9424c48a98
|
|
BLAKE2b-256 checksum How to use checksums |
aac34345e85360f33edba4252cfb2ee9f43923ee7aa71429b6cb9475dce6f6ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | django_bolt-0.13.0a1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
89df33041f55f10b9c477b1a36f603d74d3d80f5a7e839ee4e02c7cb052bb477
|
|
BLAKE2b-256 checksum How to use checksums |
b3ca6fb16cb743d06f32631bdabe533c75b4ebd4032a608144b7ae8843495dad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | django_bolt-0.13.0a1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
3213bbb56604d9247a0c34dca76fcaa2299178f5aa454ff1a801369da5eca03c
|
|
BLAKE2b-256 checksum How to use checksums |
252532b1d9c9c134ec0c759e3bb88eca19c791522e2e293f94a3e12f1c932c3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp314-cp314t-macosx_11_0_arm64.whl
| Download URL | django_bolt-0.13.0a1-cp314-cp314t-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
907cfcb140ace2c624512850afd661bc1f8e430495075065b1d70c5a5b805f65
|
|
BLAKE2b-256 checksum How to use checksums |
70bde2f16575515926744fb05d4808c83272efe4315b58c6bc68bc6beba0d8d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp314-cp314t-macosx_10_12_x86_64.whl
| Download URL | django_bolt-0.13.0a1-cp314-cp314t-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2a767ae00131c8c58d4e2c975fd4fe71f4811585f3407b2baeb8e6e34a9aecb5
|
|
BLAKE2b-256 checksum How to use checksums |
c24d324624502bc5d0a1623b7baa805eaf6efffebcecf8c35cfb91b530e922e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp312-abi3-win_amd64.whl
| Download URL | django_bolt-0.13.0a1-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ded01bd54f237352ca9f7b25fb79d7256936efd55bc67b8e049ea3ca9e3ec32a
|
|
BLAKE2b-256 checksum How to use checksums |
41f677c5fd34e725705a45faa7992ea521d67fa86199d381fa93e6c8088f5437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | django_bolt-0.13.0a1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8588af1856ef139ee10d3f0571499e143401ffad9ac0de870d7d9d21eea57ceb
|
|
BLAKE2b-256 checksum How to use checksums |
686d2bbd64c7516955f44f8d160945c9d8e53fb1ca756855d5f822cf587fcdd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | django_bolt-0.13.0a1-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
990f31454c87bbb975e8bf64f58aa1270cae0ac164fc6df0749dd3e88f5a7a2f
|
|
BLAKE2b-256 checksum How to use checksums |
3955e5977b28a51cf3cbc5c8d1cdbcfedd0f5fad563d9ac91c1f1822856afa0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | django_bolt-0.13.0a1-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c652f3611116ed484269ee99e431a32132162d77ed0d5f51a7d72652f6ef14b2
|
|
BLAKE2b-256 checksum How to use checksums |
68c08197ac9571171abeb1b83d54f725aa2d998388bd0474294a635fec065d5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_bolt-0.13.0a1-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | django_bolt-0.13.0a1-cp312-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
216922511bfa47a0596f453b17b446347dbe8287497bd00610c5becc691c1de9
|
|
BLAKE2b-256 checksum How to use checksums |
9c78fd3f0dbcfa70c4645b664a66298397316f9e25371ee21edc6f16d548a41d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for django-bolt 0.13.0a1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.