~/talk

Implementing shared functionality using Middleware

Talkat PyCon US 2022 · 2022-04-27..05-03· [web-platform, python]
slides:none on file

Shows concrete code and interoperable patterns: Flask uses before_request/after_request decorators, Django supports class and function middleware with ordering controlled in settings, and FastAPI exposes add_middleware for async ASGI classes. Demonstrates a working wrapping technique that turns WSGI/ASGI apps into framework-agnostic middleware, uses an OpenTelemetry WSGI middleware example, and shows embedding a Flask app inside Django and caching middleware for FastAPI so functionality actually runs and returns responses.

AI-written summary · about

  1. 0:00Start
  2. 1:58Flask middleware
  3. 3:40Multiple middleware in Flask
  4. 7:55Activate middleware
  5. 9:25Recap
  6. 14:00Open Telemetry WSGI Middleware
  7. 16:30Middleware for wrapping another WSGI application
  8. 16:54Wrapper Middleware
  9. 19:17A FastAPI application
  10. 19:37Using ASGI Middleware
  11. 20:52Adding the Middleware
  12. 22:40Integrate a WSGI application
  13. 23:19WSGIMiddleware Implementation
  14. 23:52Key takeaways
~/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.