FastAPI ASGI પર ચાલે છે, તેથી એક request એક async pipeline માંથી પસાર થાય છે: ASGI server તેને સ્વીકારે છે, middleware તેને લપેટે છે, router એક path ને મેચ કરે છે, dependencies ઉકેલાય છે, તમારું path operation ચાલે છે, અને return value ને response માં serialize કરવામાં આવે છે.
તબક્કાઓ
uvicorn (ASGI server)
│ scope + receive/send
▼
ASGI / Starlette middleware ── (CORS, GZip, custom)
▼
Routing ── method + મેચ કરો → operation
▼
Dependencies (Depends) ── -deps, security, -setup ઉકેલો
▼
Path operation 