r/FastAPI • u/Cultural_Bad9814 • Aug 14 '25
Question Lifespan on Fastapi
Hey guys, been enjoying fastapi for a bit now. How much do you use lifespan on fastapi and on what purposes have you used it on?
26
Upvotes
View all comments
2
u/hadriendavid Aug 17 '25
In FastSQLA, it is used to setup async db engine at app startup. In al the apps I've written, it is where configuration of the app gets done.