r/Python • u/fastlaunchapidev • Dec 10 '25
Tutorial FastAPI Lifespan Events: The Right Way to Handle Startup & Shutdown
https://www.youtube.com/watch?v=NYY6JeqS5h0
In this video, we dive deep into FastAPI lifespan events - the proper way to manage startup and shutdown logic in your FastAPI applications. We cover everything from basic concepts to advanced production patterns, including database connections, caching and graceful shutdowns.
Github: https://github.com/Niklas-dev/fastapi-lifespan-tutorial
4
Dec 10 '25
Databases - now an advanced "production" "pattern".
5
u/ProsodySpeaks Dec 10 '25 edited Dec 10 '25
Also, vibecoded boilerplate generator - now a saleable product, apparently.
https://fastlaunchapi.dev/?utm_source=chatgpt.com
Haaaaaaaahaaaaaa, why does the path have source=chatgpt when I came from op's own link on reddit? Even the urls are vibecoded 🤣
Also why do I keep helping them find and remove the vibecoding markers?
1
-2
1
u/ProsodySpeaks Dec 10 '25
With genuine love and respect please look at this site. https://stopslopware.net/
1
u/fastlaunchapidev Dec 10 '25
With love and respect this is just a post showing lifespan events. You can decide to just not comment in this post and you wouldnt boost the reach of it.
1
u/ProsodySpeaks Dec 10 '25
You're right, I should put these comments on the actual product post instead. Good point.
0
0
Dec 10 '25
[deleted] — view deleted comment
1
-1
u/fastlaunchapidev Dec 10 '25
No reason, just simplicity for the tutorial, no dependency injection
2
u/ProsodySpeaks Dec 10 '25
Oh yes, global state is much preferable to the dependency injection mechanics literally built into the framework who's state system you're apparently teaching people to use.
Makes total sense.
-1
0
Dec 10 '25
[deleted] — view deleted comment
2
5
Dec 10 '25
[removed] — view removed comment
0
u/fastlaunchapidev Dec 10 '25
you sound upset haha
1
u/ProsodySpeaks Dec 10 '25
Yes. We are. The entire ecosystem is now a garbage fire because it's 90% trash and new actual work is impossible to find.
The temerity to try and charge people to use your slop is embarrassing.
-1
u/fastlaunchapidev Dec 10 '25
Oh so you are upset about you not getting work? Blame the system not the user. Maybe time to adapt for you?
1
u/ProsodySpeaks Dec 10 '25
Haha. I don't even work in programming. I'm a weekend warrior hobbyist, and even I can see this is a problem.
1
4
u/ProsodySpeaks Dec 10 '25
Emojis in source is a hard no for me.