FastAPI Tutorial #8: Class-Based & Sub-Dependencies
Mathew K Analytics
0:00 / 0:00
FastAPI Tutorial #8: Class-Based & Sub-Dependencies
7 просмотров · 2 дня назад
Mathew K Analytics
1,38 тыс. подписчиков
7 просмотров · 2 дня назад
📓 Free Jupyter notebook for this lesson: https://www.mathewkanalytics.com/less...
☕ Support the channel: https://buymeacoffee.com/mathewkanaly...
Take dependency injection further with callable classes, dependency chains and yield-based setup and teardown.
Using classes as dependencies
Building sub-dependency chains
Controlling reuse with use_cache
Setup and teardown using yield
Router-level and app-level dependencies
Releasing resources reliably
Choosing between functions and classes
#FastAPI #Python #WebDevelopment