Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 323 for Background (0.12 sec)

  1. fastapi/background.py

    from starlette.background import BackgroundTasks as StarletteBackgroundTasks
    from typing_extensions import Annotated, Doc, ParamSpec
    
    P = ParamSpec("P")
    
    
    class BackgroundTasks(StarletteBackgroundTasks):
        """
        A collection of background tasks that will be called after a response has been
        sent to the client.
    
        Read more about it in the
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Apr 02 02:48:51 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. docs/en/docs/reference/background.md

    # 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`:
    
    ```python
    from fastapi import BackgroundTasks
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 377 bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/background-tasks.md

    {* ../../docs_src/background_tasks/tutorial001.py hl[6:9] *}
    
    ## Add the background task
    
    Inside of your *path operation function*, pass your task function to the *background tasks* object with the method `.add_task()`:
    
    {* ../../docs_src/background_tasks/tutorial001.py hl[14] *}
    
    `.add_task()` receives as arguments:
    
    * A task function to be run in the background (`write_notification`).
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:22:48 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/background-tasks.md

    A classe `BackgroundTasks` vem diretamente de <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>.
    
    Ela é importada/incluída diretamente no FastAPI para que você possa importá-la do `fastapi` e evitar a importação acidental da alternativa `BackgroundTask` (sem o `s` no final) de `starlette.background`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/background-tasks.md

    Die Klasse `BackgroundTasks` stammt direkt von <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>.
    
    Sie wird direkt in FastAPI importiert/inkludiert, sodass Sie sie von `fastapi` importieren können und vermeiden, versehentlich das alternative `BackgroundTask` (ohne das `s` am Ende) von `starlette.background` zu importieren.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/background-tasks.md

    如果请求中有查询,它将在后台任务中写入日志。
    
    然后另一个在 *路径操作函数* 生成的后台任务会使用路径参数 `email` 写入一条信息。
    
    ## 技术细节
    
    `BackgroundTasks` 类直接来自 <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>。
    
    它被直接导入/包含到FastAPI以便你可以从 `fastapi` 导入,并避免意外从 `starlette.background` 导入备用的 `BackgroundTask` (后面没有 `s`)。
    
    通过仅使用 `BackgroundTasks` (而不是 `BackgroundTask`),使得能将它作为 *路径操作函数* 的参数 ,并让**FastAPI**为您处理其余部分, 就像直接使用 `Request` 对象。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. docs/fr/docs/tutorial/background-tasks.md

    La classe `BackgroundTasks` provient directement de <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>.
    
    Elle est importée/incluse directement dans **FastAPI** pour que vous puissiez l'importer depuis `fastapi` et éviter d'importer accidentellement `BackgroundTask` (sans `s` à la fin) depuis `starlette.background`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 10:29:51 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/background-tasks.md

    そして、*path operations 関数* で生成された別のバックグラウンドタスクは、`email` パスパラメータを使用してメッセージを書き込みます。
    
    ## 技術的な詳細
    
    `BackgroundTasks` クラスは、<a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>から直接取得されます。
    
    これは、FastAPI に直接インポート/インクルードされるため、`fastapi` からインポートできる上に、`starlette.background`から別の `BackgroundTask` (末尾に `s` がない) を誤ってインポートすることを回避できます。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/background-tasks.md

    ## Технические детали
    
    Класс `BackgroundTasks` основан на <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>.
    
    Он интегрирован в FastAPI, так что вы можете импортировать его прямо из `fastapi` и избежать случайного импорта `BackgroundTask` (без `s` на конце) из `starlette.background`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/background-tasks.md

    ## 📡 ℹ
    
    🎓 `BackgroundTasks` 👟 🔗 ⚪️➡️ <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>.
    
    ⚫️ 🗄/🔌 🔗 🔘 FastAPI 👈 👆 💪 🗄 ⚫️ ⚪️➡️ `fastapi` &amp; ❎ 😫 🗄 🎛 `BackgroundTask` (🍵 `s` 🔚) ⚪️➡️ `starlette.background`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top