Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 61 - 70 of 453 for starlette (0.09 seconds)

  1. docs/zh-hant/docs/advanced/testing-websockets.md

    你可以使用相同的 `TestClient` 來測試 WebSocket。
    
    為此,你可以在 `with` 陳述式中使用 `TestClient`,連線到該 WebSocket:
    
    {* ../../docs_src/app_testing/tutorial002_py310.py hl[27:31] *}
    
    /// note | 注意
    
    想了解更多,請參考 Starlette 的[測試 WebSocket](https://www.starlette.dev/testclient/#testing-websocket-sessions)文件。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 420 bytes
    - Click Count (0)
  2. docs/zh/docs/tutorial/background-tasks.md

    ## 技术细节 { #technical-details }
    
    `BackgroundTasks` 类直接来自 [`starlette.background`](https://www.starlette.dev/background/)。
    
    它被直接导入/包含到FastAPI以便你可以从 `fastapi` 导入,并避免意外从 `starlette.background` 导入备用的 `BackgroundTask` (后面没有 `s`)。
    
    通过仅使用 `BackgroundTasks` (而不是 `BackgroundTask`),使得能将它作为 *路径操作函数* 的参数 ,并让**FastAPI**为您处理其余部分, 就像直接使用 `Request` 对象。
    
    在FastAPI中仍然可以单独使用 `BackgroundTask`,但您必须在代码中创建对象,并返回包含它的Starlette `Response`。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/websockets.md

    ///
    
    ## More info { #more-info }
    
    To learn more about the options, check Starlette's documentation for:
    
    * [The `WebSocket` class](https://www.starlette.dev/websockets/).
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  4. docs/zh-hant/docs/tutorial/path-operation-configuration.md

    {* ../../docs_src/path_operation_configuration/tutorial001_py310.py hl[1,15] *}
    
    該狀態碼會用於回應,並被加入至 OpenAPI 結構描述中。
    
    /// note | 技術細節
    
    你也可以使用 `from starlette import status`。
    
    **FastAPI** 提供與 `starlette.status` 相同的 `fastapi.status`,僅為了方便你這位開發者,但它其實直接來自 Starlette。
    
    ///
    
    ## 標籤 { #tags }
    
    你可以為「路徑操作」加入標籤,傳入參數 `tags`,其值為由 `str` 組成的 `list`(通常只是一個 `str`):
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  5. docs/en/docs/advanced/testing-websockets.md

    For this, you use the `TestClient` in a `with` statement, connecting to the WebSocket:
    
    {* ../../docs_src/app_testing/tutorial002_py310.py hl[27:31] *}
    
    /// note
    
    For more details, check Starlette's documentation for [testing WebSockets](https://www.starlette.dev/testclient/#testing-websocket-sessions).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 411 bytes
    - Click Count (0)
  6. docs/zh-hant/docs/tutorial/response-status-code.md

    它們只是方便用的常數,值與數字相同,但這樣你可以用編輯器的自動完成來找到它們:
    
    <img src="/img/tutorial/response-status-code/image02.png">
    
    /// note | 技術細節
    
    你也可以使用 `from starlette import status`。
    
    **FastAPI** 將同一個 `starlette.status` 以 `fastapi.status` 形式提供,純粹是為了讓你(開發者)方便。但它直接來自 Starlette。
    
    ///
    
    ## 變更預設值 { #changing-the-default }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  7. docs/en/docs/reference/status.md

    # Status Codes
    
    You can import the `status` module from `fastapi`:
    
    ```python
    from fastapi import status
    ```
    
    `status` is provided directly by Starlette.
    
    It contains a group of named constants (variables) with integer status codes.
    
    For example:
    
    * 200: `status.HTTP_200_OK`
    * 403: `status.HTTP_403_FORBIDDEN`
    * etc.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 871 bytes
    - Click Count (0)
  8. pyproject.toml

        "httpx >=0.23.0,<1.0.0",
        # For templates
        "jinja2 >=3.1.5",
        # For forms and file uploads
        "python-multipart >=0.0.18",
        # For Starlette's SessionMiddleware, not commonly used with FastAPI
        "itsdangerous >=1.1.0",
        # For Starlette's schema generation, would not be used with FastAPI
        "pyyaml >=5.3.1",
        # To validate email fields
        "email-validator >=2.0.0",
        # Uvicorn with uvloop
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 12:36:49 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  9. docs/ja/docs/advanced/testing-events.md

    テストで `lifespan` を実行する必要がある場合は、`with` 文と併用して `TestClient` を使用できます:
    
    {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *}
    
    より詳しい内容は、[公式 Starlette ドキュメントの「テストでの lifespan の実行」](https://www.starlette.dev/lifespan/#running-lifespan-in-tests) を参照してください。
    
    非推奨の `startup` および `shutdown` イベントについては、次のように `TestClient` を使用できます:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 15:24:30 GMT 2026
    - 724 bytes
    - Click Count (0)
  10. docs/zh/docs/advanced/websockets.md

    ///
    
    ## 更多信息 { #more-info }
    
    要了解更多选项,请查看 Starlette 的文档:
    
    * [`WebSocket` 类](https://www.starlette.dev/websockets/)。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 5.4K bytes
    - Click Count (0)
Back to Top