...
/Implement Background Tasks in FastAPI
Implement Background Tasks in FastAPI
Learn how to run background tasks and send an immediate response to the client using FastAPI.
We'll cover the following...
What are background tasks?
Often when you get a request from a client, you do not want your API to process that data completely, else you will have to send a confirmation as soon as you receive a request and process that data or operation in the background. In other words, these are useful for operations that need to happen after a request, but the client doesn’t need to wait for the operation to get completed before receiving the response. For example:
-
Email notifications sent after performing some action: ...