FastAPI - Middleware and Hooks
You want to initialize a logging system on startup and properly close it on shutdown in FastAPI. Which code snippet correctly implements this lifecycle management?
@app.on_event("startup") to configure logging and @app.on_event("shutdown") to flush and close handlers -> Option A15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions