Hacker News new | ask | show | jobs
by yhoiseth 1907 days ago
How productive are you with FastAPI compared to Django? I’m thinking of things like forms, error handling and all the other extra stuff that comes with decoupling the frontend and backend.
2 comments

The main thing I would wonder about is if there's a good auth plugin for FastAPI.

I am not a huge fan of Django, but if you have already chosen Python, it is really hard to argue with having good, battle-tested auth system out of the box.

The other side of the coin is that django's auth system is pretty rigid. Adding additional fields to the user object is clunky, and trying to do an unusual auth flow can be downright ugly. Dealing with that a few times can leave you a lot more open to designing your own and/or patching together other libraries. At least, that's how it went for me a few years ago.
Django allauth handles 90% of auth needs. Adding fields to user is easy if you set it up correctly
Not nearly as productive. That's why django is definitely a better choice for rapid prototyping. But if I'm working on a larger project that I'm hoping to maintain for years, up-front productivity usually takes a back seat to maintainability/scalability/extensibility. For those, I'd go with FastApi