Search Options

Results per page
Sort
Preferred Languages
Advance

Results 261 - 270 of 276 for tutorial005_an_py310 (0.7 sec)

  1. docs/zh/docs/advanced/websockets.md

    在 WebSocket 端点中,您可以从 `fastapi` 导入并使用以下内容:
    
    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    它们的工作方式与其他 FastAPI 端点/ *路径操作* 相同:
    
    {* ../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82] *}
    
    /// info
    
    由于这是一个 WebSocket,抛出 `HTTPException` 并不是很合理,而是抛出 `WebSocketException`。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/background-tasks.md

    **FastAPI** 知道在每种情况下该做什么以及如何复用同一对象,因此所有后台任务被合并在一起并且随后在后台运行:
    
    //// tab | Python 3.10+
    
    {* ../../docs_src/background_tasks/tutorial002_an_py310.py hl[13, 15, 22, 25] *}
    
    ////
    
    //// tab | Python 3.9+
    
    {* ../../docs_src/background_tasks/tutorial002_an_py39.py hl[13, 15, 22, 25] *}
    
    ////
    
    //// tab | Python 3.8+
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  3. docs/es/docs/advanced/websockets.md

    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    Funcionan de la misma manera que para otros endpoints de FastAPI/*path operations*:
    
    {* ../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82] *}
    
    /// info | Información
    
    Como esto es un WebSocket no tiene mucho sentido lanzar un `HTTPException`, en su lugar lanzamos un `WebSocketException`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/cookie-param-models.md

    ///
    
    /// tip
    
    此技术同样适用于 `Query` 、 `Cookie` 和 `Header` 。😎
    
    ///
    
    ## 带有 Pydantic 模型的 Cookie
    
    在 **Pydantic** 模型中声明所需的 **cookie** 参数,然后将参数声明为 `Cookie` :
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    **FastAPI** 将从请求中接收到的 **cookie** 中**提取**出**每个字段**的数据,并提供您定义的 Pydantic 模型。
    
    ## 查看文档
    
    您可以在文档 UI 的 `/docs` 中查看定义的 cookie:
    
    <div class="screenshot">
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 10 20:38:03 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/cookie-param-models.md

    これと同じテクニックは `Query` 、 `Cookie` 、 `Header` にも適用できます。 😎
    
    ///
    
    ## クッキーにPydanticモデルを使用する
    
    必要な複数の**クッキー**パラメータを**Pydanticモデル**で宣言し、さらに、それを `Cookie` として宣言しましょう:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    **FastAPI**は、リクエストの**クッキー**から**それぞれのフィールド**のデータを**抽出**し、定義された**Pydanticモデル**を提供します。
    
    ## ドキュメントの確認
    
    対話的APIドキュメントUI `/docs` で、定義されているクッキーを確認できます:
    
    <div class="screenshot">
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Feb 28 14:21:27 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial004.py

    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial004_py39"),
            pytest.param("tutorial004_py310", marks=needs_py310),
            pytest.param("tutorial004_an_py39"),
            pytest.param("tutorial004_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.body_multiple_params.{request.param}")
    
        client = TestClient(mod.app)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/websockets.md

    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    Diese funktionieren auf die gleiche Weise wie für andere FastAPI-Endpunkte/*Pfadoperationen*:
    
    {* ../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82] *}
    
    /// info | Info
    
    Da es sich um einen WebSocket handelt, macht es keinen Sinn, eine `HTTPException` auszulösen, stattdessen lösen wir eine `WebSocketException` aus.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/cookie-param-models.md

    /// tip | 팁
    
    동일한 기술이 `Query`, `Cookie`, 그리고 `Header`에 적용됩니다. 😎
    
    ///
    
    ## Pydantic 모델을 사용한 쿠키
    
    **Pydantic 모델**에 필요한 **쿠키** 매개변수를 선언한 다음, 해당 매개변수를 `Cookie`로 선언합니다:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    **FastAPI**는 요청에서 받은 **쿠키**에서 **각 필드**에 대한 데이터를 **추출**하고 정의한 Pydantic 모델을 줍니다.
    
    ## 문서 확인하기
    
    문서 UI `/docs`에서 정의한 쿠키를 볼 수 있습니다:
    
    <div class="screenshot">
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Dec 09 12:47:02 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. docs/ko/docs/advanced/websockets.md

    WebSocket 엔드포인트에서 `fastapi`에서 다음을 가져와 사용할 수 있습니다:
    
    * `Depends`
    * `Security`
    * `Cookie`
    * `Header`
    * `Path`
    * `Query`
    
    이들은 다른 FastAPI 엔드포인트/*경로 작동*과 동일하게 동작합니다:
    
    {* ../../docs_src/websockets/tutorial002_an_py310.py hl[68:69,82] *}
    
    /// info | 정보
    
    WebSocket에서는 `HTTPException`을 발생시키는 것이 적합하지 않습니다. 대신 `WebSocketException`을 발생시킵니다.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/background-tasks.md

    **FastAPI** knows what to do in each case and how to reuse the same object, so that all the background tasks are merged together and are run in the background afterwards:
    
    
    {* ../../docs_src/background_tasks/tutorial002_an_py310.py hl[13,15,22,25] *}
    
    
    In this example, the messages will be written to the `log.txt` file *after* the response is sent.
    
    If there was a query in the request, it will be written to the log in a background task.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.8K bytes
    - Viewed (0)
Back to top