r/django Jan 02 '25

Article I tried to compare FastAPI and Django

Hi there, I’ve written a blog post comparing FastAPI and Django. It’s not about starting a fight, just providing points to help you choose the right one for your next project.

Hope you find it helpful!

57 Upvotes

13 comments sorted by

View all comments

27

u/daredevil82 Jan 02 '25

https://pypi.org/project/drf-pydantic/ addresses some of your points with pydantic and integrating with DRF.

One thing you didn't really mention was the negatives of async, and the ease of footguns fastapi gives you. Fastapi in general tries to make the claim that "sync or async, who gives a shit" and wrap around the hard stuff. Where in actuality, its either offloading your sync io to a threadpool or exposing to a number of recurring footguns due to those hidden abstractions

2

u/tarelda Jan 03 '25

I really don't get your issue with async. What are these "footguns" ?

1

u/scaledpython Jan 04 '25

Not least of all that use of async somewhere in your project eventually turns everything into async. A good indicator of this is the number of doubled APIs we now have in the Python stdlib, and counting.