- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 22 for BackgroundTasks (0.09 seconds)
-
docs_src/background_tasks/tutorial001_py310.py
from fastapi import BackgroundTasks, FastAPI app = FastAPI() def write_notification(email: str, message=""): with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 519 bytes - Click Count (0) -
tests/test_dependency_contextmanager.py
import json import pytest from fastapi import BackgroundTasks, Depends, FastAPI from fastapi.responses import StreamingResponse from fastapi.testclient import TestClient app = FastAPI() state = { "/async": "asyncgen not started", "/sync": "generator not started", "/async_raise": "asyncgen raise not started", "/sync_raise": "generator raise not started", "context_a": "not started a", "context_b": "not started b",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 11.5K bytes - Click Count (0) -
fastapi/dependencies/utils.py
is_uploadfile_sequence_annotation, lenient_issubclass, sequence_types, serialize_sequence_value, value_is_sequence, ) from fastapi.background import BackgroundTasks from fastapi.concurrency import ( asynccontextmanager, contextmanager_in_threadpool, ) from fastapi.dependencies.models import Dependant from fastapi.exceptions import DependencyScopeErrorCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 38.7K bytes - Click Count (3) -
docs/es/docs/tutorial/background-tasks.md
## Usando `BackgroundTasks` { #using-backgroundtasks } Primero, importa `BackgroundTasks` y define un parámetro en tu *path operation function* con una declaración de tipo de `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI** creará el objeto de tipo `BackgroundTasks` por ti y lo pasará como ese parámetro.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 5K bytes - Click Count (0) -
docs/pt/docs/tutorial/background-tasks.md
## Usando `BackgroundTasks` { #using-backgroundtasks } Primeiro, importe `BackgroundTasks` e defina um parâmetro na sua *função de operação de rota* com uma declaração de tipo `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} O **FastAPI** criará o objeto do tipo `BackgroundTasks` para você e o passará como esse parâmetro.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 5.1K bytes - Click Count (0) -
docs/uk/docs/tutorial/background-tasks.md
## Використання `BackgroundTasks` { #using-backgroundtasks } Спочатку імпортуйте `BackgroundTasks` і оголосіть параметр у вашій функції операції шляху з анотацією типу `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI** створить для вас об’єкт типу `BackgroundTasks` і передасть його як цей параметр.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 7.6K bytes - Click Count (0) -
docs/fr/docs/tutorial/background-tasks.md
## Utiliser `BackgroundTasks` { #using-backgroundtasks } Pour commencer, importez `BackgroundTasks` et définissez un paramètre dans votre *fonction de chemin d'accès* avec `BackgroundTasks` comme type déclaré. {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI** créera l'objet de type `BackgroundTasks` pour vous et le passera comme paramètre.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 5.5K bytes - Click Count (0) -
docs/de/docs/tutorial/background-tasks.md
## `BackgroundTasks` verwenden { #using-backgroundtasks } Importieren Sie zunächst `BackgroundTasks` und definieren Sie einen Parameter in Ihrer *Pfadoperation-Funktion* mit der Typdeklaration `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI** erstellt für Sie das Objekt vom Typ `BackgroundTasks` und übergibt es als diesen Parameter.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 5.7K bytes - Click Count (0) -
docs/tr/docs/tutorial/background-tasks.md
## `BackgroundTasks` Kullanımı { #using-backgroundtasks } Önce `BackgroundTasks`’i import edin ve *path operation function*’ınızda `BackgroundTasks` tip bildirimi olan bir parametre tanımlayın: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI**, sizin için `BackgroundTasks` tipinde bir obje oluşturur ve onu ilgili parametre olarak geçirir.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 5K bytes - Click Count (0) -
docs/ru/docs/tutorial/background-tasks.md
## Использование `BackgroundTasks` { #using-backgroundtasks } Сначала импортируйте `BackgroundTasks` и объявите параметр в вашей функции‑обработчике пути с типом `BackgroundTasks`: {* ../../docs_src/background_tasks/tutorial001_py310.py hl[1,13] *} **FastAPI** создаст объект типа `BackgroundTasks` для вас и передаст его через этот параметр.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 7.5K bytes - Click Count (0)