S

Shyam Dubey • 3.70K Points
Extraordinary

Q. How can you create a background task in FastAPI?

  • (A) Using asyncio only
  • (B) Using BackgroundTasks from fastapi
  • (C) Using threading
  • (D) Using subprocess
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category Fast API
  • Hashtags:

Explanation by: Shyam Dubey
FastAPI provides BackgroundTasks for running tasks after returning a response.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.