VOL.08 — FIELD NOTES · ENTRY 05/23

▲ 8,200M

BackendJanuary 19, 20258 min read

FastAPI vs Django: Three Years In Production, Here Is the Real Answer

Every comparison of FastAPI and Django online reads like it was written by someone who used both for a weekend tutorial. I have shipped both, in production, for paying clients, in a market where if it breaks I am the one who gets the angry call. So here is the version with scars on it.

The short answer nobody likes

It depends, and it depends on things that have nothing to do with the frameworks. It depends on your team, your timeline, and how much of the boring stuff you want to build yourself. That said, I do have strong opinions, so let me earn them.

Where Django won for me

I built an ERP-ish admin tool for a client who needed it yesterday. The whole value was in the admin panel, the user management, the permissions, the data tables that staff would stare at all day. Django gave me the admin for free. The ORM and migrations were mature and boring in the best way. Authentication was solved. I shipped in a fraction of the time it would have taken to assemble the same thing from parts.

Django is batteries included, and in a small market where you bill by the project, those batteries are pure profit.

The client did not care about async throughput. They cared about staff being able to edit records without breaking things. Django was the right call and it was not close.

Where FastAPI won for me

Then I had a project that was mostly an API feeding a React front end and a mobile app, with some machine learning inference in the request path. Here FastAPI shined. The async model meant I could handle slow external calls without blocking. The Pydantic validation caught bad data at the boundary instead of deep inside my code. And the automatic OpenAPI docs meant the front-end developer could work against a real spec without me writing a wiki page.

The ML integration mattered too. My inference code was Python anyway, and FastAPI let me serve it cleanly without the weight of a full web framework I did not need.

The project where Django quietly failed me

Here is the honest one. I started a real-time-ish feature on a Django project, notifications and live updates, and I fought the framework the whole way. Django can do async now, sure, but the ecosystem around it, the ORM, the middleware, a lot of third-party packages, still feels sync-first. I ended up bolting on extra infrastructure to make it work, and it was fragile. If I had reached for an async-native stack from the start, I would have saved a week and a lot of frustration. That one was my fault for picking the comfortable tool instead of the right one.

My actual rule of thumb

  • Heavy admin, content, internal tools, fast delivery, team that knows Django: pick Django.
  • API-first, mobile or SPA front end, ML in the loop, async-heavy, performance you can feel: pick FastAPI.
  • If you do not know yet, lean Django for speed of delivery. You can carve out a FastAPI service later for the hot path.

The thing both crowds get wrong

FastAPI people love to wave benchmarks around. Django people love to say Django scales fine, look at Instagram. Both are right and both are missing the point. For most projects, in most companies, especially small ones like the ones I work with, the bottleneck is never the framework. It is the database query you forgot to index, the N plus one you did not notice, the third-party API that takes two seconds. Pick the framework that lets your team move, then go fix the real bottleneck.

Saroj Prasad Mainali

Full-Stack Engineer · Kathmandu

WHAT I AM DOING NOW

MORE FIELD NOTES

03