Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 200 for tutorial002 (2.25 sec)

  1. docs/ja/docs/tutorial/path-params.md

    {* ../../docs_src/path_params/tutorial005.py hl[16] *}
    
    ### ドキュメントの確認
    
    *パスパラメータ*の利用可能な値が事前に定義されているので、対話的なドキュメントで適切に表示できます:
    
    <img src="/img/tutorial/path-params/image03.png">
    
    ### Python*列挙型*の利用
    
    *パスパラメータ*の値は*列挙型メンバ*となります。
    
    #### *列挙型メンバ*の比較
    
    これは、作成した列挙型 `ModelName` の*列挙型メンバ*と比較できます:
    
    {* ../../docs_src/path_params/tutorial005.py hl[17] *}
    
    #### *列挙値*の取得
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. docs/uk/docs/tutorial/body-nested-models.md

    Але в Python версії до 3.9 (від 3.6 і вище) спочатку потрібно імпортувати `List` з модуля стандартної бібліотеки Python `typing`:
    
    {* ../../docs_src/body_nested_models/tutorial002.py hl[1] *}
    
    ### Оголошення `list` з параметром типу
    
    Щоб оголосити типи з параметрами типу (внутрішніми типами), такими як `list`, `dict`, `tuple`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Feb 28 14:18:01 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/events.md

    ### `startup` 事件
    
    使用 `startup` 事件声明 `app` 启动前运行的函数:
    
    {* ../../docs_src/events/tutorial001.py hl[8] *}
    
    本例中,`startup` 事件处理器函数为项目数据库(只是**字典**)提供了一些初始值。
    
    **FastAPI** 支持多个事件处理器函数。
    
    只有所有 `startup` 事件处理器运行完毕,**FastAPI** 应用才开始接收请求。
    
    ### `shutdown` 事件
    
    使用 `shutdown` 事件声明 `app` 关闭时运行的函数:
    
    {* ../../docs_src/events/tutorial002.py hl[6] *}
    
    此处,`shutdown` 事件处理器函数在 `log.txt` 中写入一行文本 `Application shutdown`。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 7K bytes
    - Viewed (0)
  4. docs/ko/docs/advanced/events.md

    {* ../../docs_src/events/tutorial001.py hl[8] *}
    
    이 경우, `startup` 이벤트 핸들러 함수는 "database"라는 항목(단지 `dict`)을 일부 값으로 초기화합니다.
    
    여러 개의 이벤트 핸들러 함수를 추가할 수 있습니다.
    
    애플리케이션은 모든 `startup` 이벤트 핸들러가 완료될 때까지 요청을 받기 시작하지 않습니다.
    
    ### `shutdown` 이벤트
    
    애플리케이션이 종료될 때 실행되어야 하는 함수를 추가하려면, `"shutdown"` 이벤트로 선언합니다:
    
    {* ../../docs_src/events/tutorial002.py hl[6] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/body.md

    * インスペクション
    
    ///
    
    ## モデルの使用
    
    関数内部で、モデルの全ての属性に直接アクセスできます:
    
    {* ../../docs_src/body/tutorial002.py hl[21] *}
    
    ## リクエストボディ + パスパラメータ
    
    パスパラメータとリクエストボディを同時に宣言できます。
    
    **FastAPI** はパスパラメータである関数パラメータは**パスから受け取り**、Pydanticモデルによって宣言された関数パラメータは**リクエストボディから受け取る**ということを認識します。
    
    {* ../../docs_src/body/tutorial003.py hl[17:18] *}
    
    ## リクエストボディ + パスパラメータ + クエリパラメータ
    
    また、**ボディ**と**パス**と**クエリ**のパラメータも同時に宣言できます。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Jul 26 10:48:11 UTC 2025
    - 7.8K bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/behind-a-proxy.md

        "root_path": "/api/v1"
    }
    ```
    
    ### 在 FastAPI 应用里设置 `root_path`
    
    还有一种方案,如果不能提供 `--root-path` 或等效的命令行选项,则在创建 FastAPI 应用时要设置 `root_path` 参数。
    
    {* ../../docs_src/behind_a_proxy/tutorial002.py hl[3] *}
    
    传递 `root_path` 给 `FastAPI` 与传递 `--root-path` 命令行选项给 Uvicorn 或 Hypercorn 一样。
    
    ### 关于 `root_path`
    
    注意,服务器(Uvicorn)只是把 `root_path` 传递给应用。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. docs/ko/docs/tutorial/request-files.md

    ///
    
    ## `File` 임포트
    
    `fastapi` 에서 `File` 과 `UploadFile` 을 임포트 합니다:
    
    {* ../../docs_src/request_files/tutorial001.py hl[1] *}
    
    ## `File` 매개변수 정의
    
    `Body` 및 `Form` 과 동일한 방식으로 파일의 매개변수를 생성합니다:
    
    {* ../../docs_src/request_files/tutorial001.py hl[7] *}
    
    /// info | 정보
    
    `File` 은 `Form` 으로부터 직접 상속된 클래스입니다.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/first-steps.md

    {* ../../docs_src/first_steps/tutorial001.py hl[1] *}
    
    `FastAPI`は、APIのすべての機能を提供するPythonクラスです。
    
    /// note | 技術詳細
    
    `FastAPI`は`Starlette`を直接継承するクラスです。
    
    `FastAPI`でも<a href="https://www.starlette.dev/" class="external-link" target="_blank">Starlette</a>のすべての機能を利用可能です。
    
    ///
    
    ### Step 2: `FastAPI`の「インスタンス」を生成
    
    {* ../../docs_src/first_steps/tutorial001.py hl[3] *}
    ここで、`app`変数が`FastAPI`クラスの「インスタンス」になります。
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 11K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/handling-errors.md

    ///
    
    ## カスタムヘッダーの追加
    
    例えば、いくつかのタイプのセキュリティのために、HTTPエラーにカスタムヘッダを追加できると便利な状況がいくつかあります。
    
    おそらくコードの中で直接使用する必要はないでしょう。
    
    しかし、高度なシナリオのために必要な場合には、カスタムヘッダーを追加することができます:
    
    {* ../../docs_src/handling_errors/tutorial002.py hl[14] *}
    
    ## カスタム例外ハンドラのインストール
    
    カスタム例外ハンドラは<a href="https://www.starlette.dev/exceptions/" class="external-link" target="_blank">Starletteと同じ例外ユーティリティ</a>を使用して追加することができます。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/body-nested-models.md

    这将使 `tags` 成为一个由元素组成的列表。不过它没有声明每个元素的类型。
    
    ## 具有子类型的 List 字段
    
    但是 Python 有一种特定的方法来声明具有子类型的列表:
    
    ### 从 typing 导入 `List`
    
    首先,从 Python 的标准库 `typing` 模块中导入 `List`:
    
    {* ../../docs_src/body_nested_models/tutorial002.py hl[1] *}
    
    ### 声明具有子类型的 List
    
    要声明具有子类型的类型,例如 `list`、`dict`、`tuple`:
    
    * 从 `typing` 模块导入它们
    * 使用方括号 `[` 和 `]` 将子类型作为「类型参数」传入
    
    ```Python
    from typing import List
    
    my_list: List[str]
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
Back to top