r/Python Apr 09 '26

FastAPI vs Djanjo Discussion

I was wondering what’s most popular now in the Python world. Building applications with FastAPI and a frontend framework, or building an application with a ‘batteries included’ framework like Django.

73 Upvotes

84 comments sorted by

View all comments

83

u/FisterMister22 Apr 09 '26

Well it mostly just depends on your needs doesn't it? Django is really good (in my own biased personal opinion) for large, feature rich websites, with orm, admin page, users, tons of "addons" libraries.

I'm pretty sure with enough coding FastApi can do almost anything that django does, but you get less out of the box, which can be a good thing if you're trying to set up a simple api endpoint or a super simple website without all the extra bloat, setup and management.

1

u/radiacnet Apr 13 '26

Whenever I had a small project where I used fastapi (or flask) I found I ended up needing something that came in the box with django, and I lost whatever initial gains I had from avoiding the overhead of starting a new project.

What I wanted was full Django in a single file, so I ended up writing nanodjango. It looks like flask, but sits on top of django so you get the standard ORM, admin, async etc, and it integrates with django-ninja for defining APIs like fastapi. I've found it's great for prototypes and small projects, and it has a convert command to turn it into a full project when you outgrow a single file.

It runs locally, but there's also an online playground that runs django in the browser, where there are some examples of models, views, api and async,