substrate
substrate copied to clipboard
Replace `FastAPI.on_event` by `lifespan` event handler in API template
Alternative events are now deprecated in FastAPI.
i.e., the method on_event in class FastAPI is deprecated. lifespan event handlers should be used instead.
on_event is used in the FastAPI template in api.py.
Thanks for this great template!
Already done in #222!
We just merged #222, so I'll go ahead and close this. Thanks for posting this though!