FastAPI
Python web framework for building APIs, based on type hints, Pydantic and Starlette.
Commenters pick it as a lightweight Python backend for REST APIs, often paired with PostgreSQL,12345 and credit its API design.6 The most common caveat is that Python async is widely misunderstood78 and gets messy in larger production apps.9
Why people recommend it
Default backend stack · 3
Commenters name it as their preferred backend, usually alongside PostgreSQL.
“My stack of choice would be FastAPI + Svelte + PostgreSQL”
“Since I love FastAPI and PostgreSQL”
Show 1 more
“on the back i use fastapi with postgresql and oauth2”
Lightweight layer · 1
One commenter replaced Cog with a thin FastAPI layer for GPU model serving and was immediately unblocked.
“I replaced it with a lightweight FastAPI layer, which immediately unblocked me”
API design · 1
Its API design is credited as work that other libraries have copied.
“the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested”
Python ecosystem · 1
It is cited as part of what pulled a long-time Ruby developer over to Python.
“Python has won for me: fastapi, pytorch, langchain, streamlit, and so on and on.”
Caveats and dissent
Async confusion · 3
People adopt it because it is "faster" even for compute-bound work, and async Python with types can get messy in larger apps.
“switched to FastAPI because "it's faster" even when they're using it to serve ML models which are compute bound”
“I don’t know how big production apps are maintained (and supported operationally) with the mess that is python+async+types.”
Show 1 more
“I used such a framework for a while”
Build-it-yourself · 1
A long-time Django developer found that much of what Django provides must be assembled by hand.
“Coming to a FastAPI app with alembic and finding a lot of that is build-it-yourself (and easily break it) is a bit of a shock.”
Extra over Starlette · 1
One commenter sees it as unnecessary baggage on top of Starlette.
“FastAPI is built on Starlette - to be honest I don’t see the point of the extra baggage - just use Starlette.”
Middleware streaming · 1
BaseHTTPMiddleware is reported to silently break streaming responses.
“FastAPI's BaseHTTPMiddleware silently breaks streaming responses”
Per-request transactions · 1
One commenter criticizes it for encouraging a DB connection and transaction at the start of every request.
“FastAPI encourages you to open a db connection and a transaction at the front of every request”
Often compared with
Who recommends it in their own words
Threads where it came up
- Ask HN: Who wants to be hired? (October 2026) 4 mentions
- Show HN: DrillFlow – a diagram editor where every node opens into a sub-diagram 1 mention
- Show HN: Panel – A research workspace where the agent can build its own panes 1 mention
- Show HN: Médicos por Venezuela – Non-profit medical help 1 mention
- Ask HN: What are you working on? (August 2026) 1 mention
- Ask HN: Who wants to be hired? (August 2026) 1 mention
Data: fastapi.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.
All comments 35
“Sentry, FastAPI, Express/Hono”
“Python, Django, FastAPI, PostgreSQL, Celery”
“My stack of choice would be FastAPI + Svelte + PostgreSQL”
“Technologies: Python, PostgreSQL, FastAPI”
“FastAPI + SQLite for the backend”
“a Python (FastAPI) sidecar that drives the agent backends”
“Backend: Python + FastAPI (Docker on AWS EC2)”
“on the back i use fastapi with postgresql and oauth2”
“Python, FastAPI, LangGraph, MCP, RAG, Postgres/pgvector, Redis, Celery, Docker”
“switched to FastAPI because "it's faster" even when they're using it to serve ML models which are compute bound”
“FastAPI encourages you to open a db connection and a transaction at the front of every request”
“FastAPI, React, Celery, Postgres, and Redis”
“FastAPI is built on Starlette - to be honest I don’t see the point of the extra baggage - just use Starlette.”
“Built on Python / FastAPI and Supabase for the backend.”
“right now I use fastapi and write it all in Python”
“one Python app (FastAPI/SQLAlchemy) for the backend that exposes a REST API”
“FastAPI/PostgreSQL infrastructure backbone I architected from scratch”
“shared message board backed by FastAPI + SQLite”
“the hard work that the original designers of libraries like FastAPI, Zod, Pydantic, have invested”
“FastAPI's BaseHTTPMiddleware silently breaks streaming responses”
“The backend is built with FastAPI.”
“The endpoints are hosted on a separate VPS running FastAPI”
“The endpoints are hosted on a separate VPS running FastAPI”
“Python/FastAPI backend managing asynchronous requests”
“Coming to a FastAPI app with alembic and finding a lot of that is build-it-yourself (and easily break it) is a bit of a shock.”
“Technical Stack: React Native (Expo), Next.js, FastAPI, PostgreSQL.”
“Built with FastAPI and PostgreSQL”
“Since I love FastAPI and PostgreSQL”
“I also built a backend service using Flask and FastAPI.”
“Python has won for me: fastapi, pytorch, langchain, streamlit, and so on and on.”
“Backend: Python (FastAPI) hosted on Render.”
“I replaced it with a lightweight FastAPI layer, which immediately unblocked me”
“I used such a framework for a while”
“Backend: FastAPI (Python) + some Go workers for Demucs processing”
“I don’t know how big production apps are maintained (and supported operationally) with the mess that is python+async+types.”