R

Ravina • 3.96K Points
Extraordinary

Q. Which method is used to handle startup events in FastAPI?

  • (A) @app.load()
  • (B) @app.init()
  • (C) @app.on_event('startup')
  • (D) @app.on('start')
  • Correct Answer - Option(C)
  • Views: 13
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
`@app.on_event('startup')` registers a function to be run on application startup.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.