Async vs Sync in FastAPI — When It Actually Matters

Posted on Tue 29 September 2026 in Tutorial • Tagged with FastAPI, Python, async, performance, beginner

Why This Confuses Beginners

One of the first things that trips people up in FastAPI is seeing both def and async def used for routes, sometimes in the same codebase, and not knowing which one to use or why it matters. Some tutorials use async def everywhere out of habit …


Continue reading

Streaming AI Responses in FastAPI Using Server-Sent Events (SSE)

Posted on Sat 26 September 2026 in Tutorial • Tagged with FastAPI, Python, SSE, streaming, GenAI, LLM

Why This Matters

If you've used ChatGPT or Claude, you've seen the response appear word by word instead of showing up all at once after a long wait. That's not just a visual nicety — it makes the app feel dramatically faster, even though the total time to finish the response …


Continue reading

Why Port Numbers Under 2000 Are Not Recommended in FastAPI

Posted on Tue 01 September 2026 in Tutorial • Tagged with FastAPI, Python, networking, uvicorn, backend, deployment

Why This Matters

When you're setting up a FastAPI app for the first time, it's tempting to just run uvicorn main:app --port 80 and call it a day — no need to remember a weird port number, just hit the domain directly. But if you've tried this, you've probably already …


Continue reading