- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 31 for Task (0.12 sec)
-
tests/test_tutorial/test_response_change_status_code/test_tutorial001.py
client = TestClient(app) def test_path_operation(): response = client.put("/get-or-create-task/foo") print(response.content) assert response.status_code == 200, response.text assert response.json() == "Listen to the Bar Fighters" response = client.put("/get-or-create-task/bar") assert response.status_code == 201, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Jul 09 18:06:12 GMT 2020 - 521 bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an_py310.py
if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}") async def send_notification( email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)] ): message = f"message to {email}\n" background_tasks.add_task(write_log, message)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 683 bytes - Viewed (1) -
docs/ja/docs/tutorial/background-tasks.md
```Python hl_lines="6-9" {!../../../docs_src/background_tasks/tutorial001.py!} ``` ## バックグラウンドタスクの追加 *path operations 関数* 内で、`.add_task()` メソッドを使用してタスク関数を *background tasks* オブジェクトに渡します。 ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` は以下の引数を受け取ります: * バックグラウンドで実行されるタスク関数 (`write_notification`)。 * タスク関数に順番に渡す必要のある引数の列 (`email`)。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jan 15 16:12:39 GMT 2024 - 6.1K bytes - Viewed (0) -
docs_src/response_change_status_code/tutorial001.py
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 391 bytes - Viewed (0) -
docs/de/docs/advanced/async-tests.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:25:57 GMT 2024 - 4.4K bytes - Viewed (0) -
docs/em/docs/advanced/async-tests.md
🔬 🔢 🔜 🔁, 👆 💪 🔜 🤙 (& `await`) 🎏 `async` 🔢 ↖️ ⚪️➡️ 📨 📨 👆 FastAPI 🈸 👆 💯, ⚫️❔ 👆 🔜 🤙 👫 🙆 🙆 👆 📟. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 3K bytes - Viewed (0) -
docs/pt/docs/tutorial/background-tasks.md
## Adicionar a tarefa em segundo plano Dentro de sua _função de operação de caminho_, passe sua função de tarefa para o objeto _tarefas em segundo plano_ com o método `.add_task()`: ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` recebe como argumentos: - Uma função de tarefa a ser executada em segundo plano (`write_notification`).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon May 09 23:44:32 GMT 2022 - 5.3K bytes - Viewed (0) -
docs/de/docs/tutorial/background-tasks.md
``` ## Den Hintergrundtask hinzufügen Übergeben Sie innerhalb Ihrer *Pfadoperation-Funktion* Ihre Taskfunktion mit der Methode `.add_task()` an das *Hintergrundtasks*-Objekt: ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` erhält als Argumente: * Eine Taskfunktion, die im Hintergrund ausgeführt wird (`write_notification`).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 12 14:15:29 GMT 2024 - 6.4K bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an.py
if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}") async def send_notification( email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)] ): message = f"message to {email}\n" background_tasks.add_task(write_log, message)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 725 bytes - Viewed (0) -
docs/en/docs/deployment/manually.md
Starlette and **FastAPI** are based on <a href="https://anyio.readthedocs.io/en/stable/" class="external-link" target="_blank">AnyIO</a>, which makes them compatible with both Python's standard library <a href="https://docs.python.org/3/library/asyncio-task.html" class="external-link" target="_blank">asyncio</a> and <a href="https://trio.readthedocs.io/en/stable/" class="external-link" target="_blank">Trio</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.2K bytes - Viewed (0)