FastAPI Lifespan Events are now supported on Vercel
Source: Vercel Blog
Vercel now supports FastAPI lifespan events
Vercel now supports lifespan events for FastAPI apps. This allows you to define logic that can execute on startup and graceful shutdown—such as managing database connections or flushing external logs.
Deploy FastAPI on Vercel or visit the FastAPI on Vercel documentation for more details.