~/talk

FastAPI Internals - How does it work?

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python, web-platform]
links:none on file
slides:none on file

FastAPI proves to be a thin layer over Starlette and Pydantic wired through ASGI servers like Uvicorn, with concrete surprises: response_start timing differs between servers (Uvicorn sends headers early, Hypercorn after body), routing is first-route-wins so order matters, dependency injection resolves nested calls with a per-request cache, sync dependencies run in a thread pool limited by default thread pool 40, input validation returns 422 for input 500 for output, and WebSockets are delegated to Starlette.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:10FastAPI overview and basics
  3. 2:36ASGI and server interaction
  4. 7:12Middleware stack in FastAPI
  5. 10:42Routing in Starlet
  6. 13:58Dependency injection flow
  7. 17:55Async vs sync dependencies
  8. 19:00Input/output validation
  9. 19:42When to use async or sync
  10. 21:09Closing remarks and demo
  11. 21:34Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.