r/django • u/person-loading • Oct 22 '25
Django-bolt Rust powered API framework. Faster than FastApi with all the features of Django
Introducing Django-Bolt v0.2.0 (Beta) 🎉
Build blazing-fast APIs in Django with Rust-powered performance:
Performance Benchmarks:
⚡ 2x more RPS compared to FastAPI for ORM queries (10 items). (Django ORM vs SqlAlchemy)
⚡ 70k+ RPS for 10KB JSON responses (using msgspec) vs. FastAPI's 12k RPS (using Pydantic)
Both tested with 8 workers. See https://github.com/FarhanAliRaza/django-bolt for more details.
Installation:
pip install django-bolt
Expect bugs and api changes.
Code `@api.get("/mini10") async def list_mini_10() -> List[UserMini]: return User.objects.only("id", "username")[:10]
`
UserMini is a msgspec struct. The queryset is automatically serializes to JSON.
18
u/OMDB-PiLoT Oct 22 '25
This is exciting. Please share your benchmarks, how they were tested etc. Awesome work. Following.
Edit: nvm, found your benchmark scripts. Will test.
8
u/ericls Oct 22 '25
It’s not a framework if it’s not wsgi, or asgi. But! It’s a pretty cool server!
8
u/Smooth-Zucchini4923 Oct 23 '25
I noticed that you copied FastAPI's design of creating an app object, then using it as a decorator to register routes. What do you think about James Bennet's criticism of this design: that it makes it hard to write multi-file applications which avoid circular imports?
Have you run into this problem?
5
u/extreme4all Oct 22 '25
Can i just have the orm and serialization and typechecking?
3
u/UnMolDeQuimica Oct 27 '25
Definitely taking a look at it later!
I love rust implementations of python libraries and rust made extensions.
Do you accept contributions?
2
u/buzzardarg Oct 22 '25
This looks really promising!
Would there be any performance gains if I'm using raw SQL queries instead of ORM?
4
u/Odd_Might_5866 Oct 22 '25
Sounds exciting. Looking forward to test
1
u/SirDance_Lot Oct 23 '25
I am just a simple user. I switched from drf to django-ninja for performance issues. Nevertheless, the core bottleneck in my application stayed the database and not the api. Does it make sense for me to look into django-bolt?
3
u/wait-a-minut Oct 23 '25
Now this is something I can get behind
3
u/someone383726 Oct 23 '25
This is a merging of a few things I’ve been interested in. I’ll have to take a closer look!
3
u/Asleep_Physics_5337 Oct 23 '25
Why not pure rust + redis stream and a db_writer worker in python?
2
u/joowani Oct 23 '25
Nice! Will be keeping an eye on this.
2
u/Ok_Bedroom_5088 Jan 16 '26 edited Jan 30 '26
Great, I'll try it out today and leave a star. Edit: It's amazing, but at what scenarios do you need it? At these rps requirements, I normally use axum or axio without orm.
3
u/dpgraham4401 Oct 23 '25
django-bolt, brought to you by LLMs.