R

Ravina • 3.59K Points
Extraordinary

Q. What is `Depends()` used for in FastAPI?

  • (A) To run background tasks
  • (B) To manage asynchronous database calls
  • (C) To declare and inject dependencies
  • (D) To add new middleware
  • Correct Answer - Option(C)
  • Views: 7
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
`Depends()` is used to declare dependencies for a route function in FastAPI.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.