Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation of @app.on_startup method in FastAPI #27

Open
p1utoze opened this issue Nov 28, 2023 · 0 comments
Open

Deprecation of @app.on_startup method in FastAPI #27

p1utoze opened this issue Nov 28, 2023 · 0 comments

Comments

@p1utoze
Copy link
Owner

p1utoze commented Nov 28, 2023

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.

Hackme/main.py

Lines 83 to 85 in 5926912

@app.on_event("startup")
async def load_data():
g.df = pd.read_csv('Final_List.csv')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant