Files
fastapi/docs/en/docs/reference/background.md
Nils Lindemann ebc8ac7295 📝 Tweak docs and translations links, typos, format (#11389)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2024-04-18 14:53:19 -05:00

377 B

Background Tasks - BackgroundTasks

You can declare a parameter in a path operation function or dependency function with the type BackgroundTasks, and then you can use it to schedule the execution of background tasks after the response is sent.

You can import it directly from fastapi:

from fastapi import BackgroundTasks

::: fastapi.BackgroundTasks