Skip to content

Deprecation of @app.on_startup method in FastAPI #27

Description

@p1utoze

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')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions