FrankWiles.com
Back to all questions
RB Robert B.
September 12, 2025

When should I use Django vs Flask vs FastAPI?

Hi Robert,

This is a SUPER common Python ecosystem question. I see it come up almost weekly in various online forums.

First off, I’m extremely biased as I’m on long time Django user and contributor. So take my advice with a bit of salt, but I do think I’m being fair here.

Instead of giving you a direct answer let’s walk through a bit of a decision framework.

  1. The most important thing is do you already know one of them? If so, use it! They are all very similar in terms of basic abilities. Are all well supported. None of these are going to be a BAD choice, but may not ideal worst case.

  2. Don’t know any of them? Then pick Django. It almost certainly covers your use case(s) well and has a larger community around it which means more blog posts, people to ask for help, etc.

But but but Frank, what about X feature of Y framework

Yeah there are some differences, but if you don’t have a BIG AND SPECIFIC reason right now that one of these is an OBVIOUSLY better choice, then the safe bet is to choose Django. Whatever you’re thinking about right now CAN be done while using Django as your framework I assure you.

But FastAPI is async…

Yep it is. Django doesn’t have a perfect async story with the ORM, but I’ve personally run some of the highest traffic websites out there and it’s never been a real issue. Use psycopg3 with gevent and django-db-geventpool and now all of your ORM calls are async.

Basically everything else in Django is async and progress is being made each release toward Django being fully async.

But Django is bloated and I’m not using some of the features…

So? If you’re not using features they aren’t slowing your code down, they aren’t introducing possible security vulnerabilities. They’re just taking up a bit of disk space and I assure you the few extras megabytes of source on disk isn’t a real issue.

But FastAPI uses Pydantic and Pydantic is …

Pydantic is great and FastAPI uses it wonderfully. If you’re ONLY going to make an API it’s a good pick, but often you’re building an API plus some other stuff.

You can use django-ninja which gives you the feel of FastAPI while staying firmly in the Django ecosystem where you can take advantage of the thousands of django third party ecosystem apps.

But Frank, in my situation I need …

It’s almost certainly possible to do with Django. If you’re more knowledgable about the differences in these frameworks than the average user and you have a compelling reason to pick one over the other, then by all means do so.

Again, none of these are a bad choice. But when I see users in doubt, I feel the safest path is to nudge them lightly toward Django.

View other questions about:
Previous Question
Running an development agency vs building own products. Especially with advent of AI how do you see these things changing.
Next Question
I've been struggling with optimizing Django ORM queries for a high-traffic dashboard. We use select_related everywhere, but we are still seeing N+1 issues in some background tasks.