FastAPI - Dependency Injection
You want to implement a FastAPI dependency that yields a database session and ensures it is closed after the request completes. Which implementation is correct?
yield to provide the resource and then run cleanup code after the request.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions