R

Ravina • 3.96K Points
Extraordinary

Q. What does `Depends(get_db)` typically represent in FastAPI?

  • (A) Running background tasks
  • (B) Calling another route
  • (C) Injecting a database session
  • (D) Sending a response header
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
`Depends(get_db)` is often used to inject a SQLAlchemy database session.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.