FastAPI - Middleware and Hooks
Consider this FastAPI lifespan function:
What output will appear when the app starts and then shuts down?
async def lifespan(app: FastAPI):
print('App is starting')
yield
print('App is stopping')What output will appear when the app starts and then shuts down?
