Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 791 - 800 of 1,683 for py (0.02 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/zh-hant/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial001_py310.py hl[6:7] *}
    
    路徑參數 `item_id` 的值會作為引數 `item_id` 傳入你的函式。
    
    所以,如果你執行這個範例並前往 [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo),你會看到這樣的回應:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## 具型別的路徑參數 { #path-parameters-with-types }
    
    你可以在函式中使用標準的 Python 型別註記為路徑參數宣告型別:
    
    {* ../../docs_src/path_params/tutorial002_py310.py hl[7] *}
    
    在這個例子裡,`item_id` 被宣告為 `int`。
    
    /// check
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  2. docs/ja/docs/tutorial/handling-errors.md

    ## `HTTPException`の使用 { #use-httpexception }
    
    HTTPレスポンスをエラーでクライアントに返すには、`HTTPException`を使用します。
    
    ### `HTTPException`のインポート { #import-httpexception }
    
    {* ../../docs_src/handling_errors/tutorial001_py310.py hl[1] *}
    
    ### コード内での`HTTPException`の発生 { #raise-an-httpexception-in-your-code }
    
    `HTTPException`は通常のPythonの例外であり、APIに関連するデータを追加したものです。
    
    Pythonの例外なので、`return`ではなく、`raise`です。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 11.2K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/advanced-dependencies.md

    Here's how it could look like:
    
    {* ../../docs_src/dependencies/tutorial013_an_py310.py *}
    
    The exit code, the automatic closing of the `Session` in:
    
    {* ../../docs_src/dependencies/tutorial013_an_py310.py ln[19:21] *}
    
    ...would be run after the response finishes sending the slow data:
    
    {* ../../docs_src/dependencies/tutorial013_an_py310.py ln[30:38] hl[31:33] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 9K bytes
    - Click Count (0)
  4. docs/tr/docs/tutorial/first-steps.md

    # İlk Adımlar { #first-steps }
    
    En sade FastAPI dosyası şu şekilde görünür:
    
    {* ../../docs_src/first_steps/tutorial001_py310.py *}
    
    Yukarıdakini `main.py` adlı bir dosyaya kopyalayın.
    
    Canlı sunucuyu çalıştırın:
    
    <div class="termy">
    
    ```console
    $ <font color="#4E9A06">fastapi</font> dev
    
      <span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span>  Starting development server 🚀
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 14.4K bytes
    - Click Count (0)
  5. docs/ja/docs/python-types.md

    簡単な例から始めてみましょう:
    
    {* ../../docs_src/python_types/tutorial001_py310.py *}
    
    このプログラムを呼び出すと、以下が出力されます:
    
    ```
    John Doe
    ```
    
    この関数は以下のようなことを行います:
    
    * `first_name` と `last_name` を取得します。
    * `title()` を用いて、それぞれの最初の文字を大文字に変換します。
    * 真ん中にスペースを入れて<dfn title="1つにまとめます。片方の内容をもう片方の後ろに続けます。">連結</dfn>します。
    
    {* ../../docs_src/python_types/tutorial001_py310.py hl[2] *}
    
    ### 編集 { #edit-it }
    
    これはとても簡単なプログラムです。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 14.3K bytes
    - Click Count (0)
  6. docs/zh/docs/advanced/websockets.md

    当然,这并不是最优的做法,您不应该在生产环境中使用它。
    
    在生产环境中,您应该选择上述任一选项。
    
    但这是一种专注于 WebSockets 的服务器端并提供一个工作示例的最简单方式:
    
    {* ../../docs_src/websockets_/tutorial001_py310.py hl[2,6:38,41:43] *}
    
    ## 创建 `websocket` { #create-a-websocket }
    
    在您的 **FastAPI** 应用程序中,创建一个 `websocket`:
    
    {* ../../docs_src/websockets_/tutorial001_py310.py hl[1,46:47] *}
    
    /// note | 技术细节
    
    您也可以使用 `from starlette.websockets import WebSocket`。
    
    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)
  7. docs/zh-hant/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

    {* ../../docs_src/pydantic_v1_in_v2/tutorial001_an_py310.py hl[1,4] *}
    
    ### FastAPI 對 v2 中 Pydantic v1 的支援 { #fastapi-support-for-pydantic-v1-in-v2 }
    
    自 FastAPI 0.119.0 起,也支援透過 Pydantic v2 內的 Pydantic v1(部分)以協助遷移至 v2。
    
    因此,你可以先升級到最新的 Pydantic v2,並將匯入改為使用 `pydantic.v1` 子模組,在多數情況下即可正常運作。
    
    {* ../../docs_src/pydantic_v1_in_v2/tutorial002_an_py310.py hl[2,5,15] *}
    
    /// warning
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  8. docs/ko/docs/advanced/testing-events.md

    {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *}
    
    
    ["공식 Starlette 문서 사이트에서 테스트에서 라이프스팬 실행하기."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)에 대한 자세한 내용을 더 읽을 수 있습니다.
    
    더 이상 권장되지 않는 `startup` 및 `shutdown` 이벤트의 경우, 다음과 같이 `TestClient`를 사용할 수 있습니다:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:57:01 GMT 2026
    - 741 bytes
    - Click Count (0)
  9. docs/en/docs/advanced/json-base64-bytes.md

    {* ../../docs_src/json_base64_bytes/tutorial001_py310.py ln[1:9,29:35] hl[9] *}
    
    If you check the `/docs`, they will show that the field `data` expects base64 encoded bytes:
    
    <div class="screenshot">
    <img src="/img/tutorial/json-base64-bytes/image01.png">
    </div>
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  10. docs/zh-hant/docs/tutorial/first-steps.md

    # 第一步 { #first-steps }
    
    最簡單的 FastAPI 檔案可能看起來像這樣:
    
    {* ../../docs_src/first_steps/tutorial001_py310.py *}
    
    將其複製到一個名為 `main.py` 的文件中。
    
    執行即時重新載入伺服器(live server):
    
    <div class="termy">
    
    ```console
    $ <font color="#4E9A06">fastapi</font> dev
    
      <span style="background-color:#009485"><font color="#D3D7CF"> FastAPI </font></span>  Starting development server 🚀
    
                 Searching for package file structure from directories
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 13.3K bytes
    - Click Count (0)
Back to Top