Fast API Tutorial, Part 23: Classes as Dependencies

In the last video I showed you how to use a basic method as a dependency in a FastAPI app. Since python classes themselves are callable (in the way that you can instantiate an object of a class by adding parentheses after the name) you are able to use python classes as dependencies as well. In this video I show you how to do just that. GitHub:
Back to Top