FastAPI jaħdem fuq ASGI, għalhekk request jivvjaġġa minn pipeline async: l-ASGI server jaċċettah, il-middleware jgeżwru, ir-router jaqbel path, id-dependencies jiġu riżolti, il-path operation tiegħek tiġri, u l-valur li jintbagħat lura jiġi serializzat fir-response.
L-istadji
uvicorn (ASGI server)
│ scope + receive/send
▼
ASGI / Starlette middleware ── (CORS, GZip, custom)
▼
Routing ── aqbel method + → operation
▼
Dependencies (Depends) ── irriżolvi sub-deps, security, yield-setup
▼
operation function ── il-handler tiegħek jiġri
▼
Response model ── ivvalida + serializza ħal JSON
▼
tasks ── jiġru wara -response jintbagħat
▼
Response ──▶ client
