As mentioned in FastAPI docs, the startup and shutdown events will soon be no longer available in future versions.
Need to change the load_data function to support the newer lifespan events.
|
@app.on_event("startup") |
|
async def load_data(): |
|
g.df = pd.read_csv('Final_List.csv') |
As mentioned in FastAPI docs, the startup and shutdown events will soon be no longer available in future versions.
Need to change the load_data function to support the newer
lifespanevents.Hackme/main.py
Lines 83 to 85 in 5926912