r/Python • • 9d ago

Discussion What Python libraries do you think every backend developer should learn beyond FastAPI and Pandas?

I'm curious about what Python libraries experienced developers consider essential for backend development.
I'm currently exploring FastAPI and learning more about the Python ecosystem. Beyond the usual frameworks, what libraries do you find yourself using regularly in real-world projects?
I'd love to discover some underrated libraries that are genuinely useful in production projects, not just popular ones.
What are your must-have Python libraries, and why?

82 Upvotes

119 comments sorted by

View all comments

Show parent comment

2

u/sudomatrix 9d ago

Why not FastAPI? They seem to do the same thing and FastAPI is very mature.

1

u/Aggressive-Prior4459 5d ago

Quart is a bit different from FastAPI. Quart can only run on asyncio eventloop.

-1

u/[deleted] 9d ago edited 9d ago

your choice, i love quart an use it for middelware

as example from my repo how i use it for my tools with REST + Streamable http ( sse as fallback) on same interface

Just Copy past: I am lazy! Write it before!

Note: If you learn quart you can rock FastApi

Why Quart + hypercorn?

MCP over SSE/Streamble http needs a proper async HTTP stack. The choice here is deliberate:

Quart is async Flask - same API, same routing, but fully async/await native. This matters because FastMCP's SSE handler is async, and mixing sync Flask with async MCP would require thread hacks or asyncio.run() gymnastics. With Quart, the /mcp route hands off directly to mcp.handle_sse(request) - no bridging, no blocking.

hypercorn is an ASGI server (vs. waitress/gunicorn which are WSGI). WSGI servers handle one request per thread - fine for traditional web apps, wrong for SSE where a connection stays open for minutes. hypercorn handles SSE connections as long-lived async streams without tying up threads. It also runs natively on HuggingFace Spaces without extra config.

The /mcp route in app.py is also the natural interception point - auth checks, rate limiting, payload logging can all be added there before the request ever reaches FastMCP or Rest API. That's not possible when FastMCP/FastAPi runs standalone.