edit: reading the litestar docs, it even has a built-in event system! I spent a couple weeks building something I could use with FastAPI...
It strikes me that I haven't used web frameworks a lot and never even questioned how that may not be an easy thing to do!