Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 301 for tutorial002_py310 (0.17 sec)

  1. docs/en/docs/tutorial/schema-extra-example.md

    ## `Field` additional arguments
    
    When using `Field()` with Pydantic models, you can also declare additional `examples`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="2  8-11"
    {!> ../../docs_src/schema_extra_example/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="4  10-13"
    {!> ../../docs_src/schema_extra_example/tutorial002.py!}
    ```
    
    ////
    
    ## `examples` in JSON Schema - OpenAPI
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/background-tasks.md

    ```
    
    ////
    
    //// tab | Python 3.10+ 没Annotated
    
    /// tip
    
    尽可能选择使用 `Annotated` 的版本。
    
    ///
    
    ```Python hl_lines="11  13  20  23"
    {!> ../../docs_src/background_tasks/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ 没Annotated
    
    /// tip
    
    尽可能选择使用 `Annotated` 的版本。
    
    ///
    
    ```Python hl_lines="13  15  22  25"
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/body-multiple-params.md

        "price": 42.0,
        "tax": 3.2
    }
    ```
    
    但是你也可以声明多个请求体参数,例如 `item` 和 `user`:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="20"
    {!> ../../docs_src/body_multiple_params/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="22"
    {!> ../../docs_src/body_multiple_params/tutorial002.py!}
    ```
    
    ////
    
    在这种情况下,**FastAPI** 将注意到该函数中有多个请求体参数(两个 Pydantic 模型参数)。
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. docs/en/docs/how-to/separate-openapi-schemas.md

    Let's say you have a Pydantic model with default values, like this one:
    
    {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:7] hl[7] *}
    
    ### Model for Input
    
    If you use this model as an input like here:
    
    {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:15] hl[14] *}
    
    ...then the `description` field will **not be required**. Because it has a default value of `None`.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sat Oct 26 16:43:54 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params-str-validations.md

    //// tab | Python 3.10+
    
    ```Python hl_lines="7"
    {!> ../../docs_src/query_params_str_validations/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="9"
    {!> ../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    ////
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/websockets.md

    ```
    
    ////
    
    //// tab | Python 3.10+ 非带注解版本
    
    /// tip
    
    如果可能,请尽量使用 `Annotated` 版本。
    
    ///
    
    ```Python hl_lines="66-67  79"
    {!> ../../docs_src/websockets/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ 非带注解版本
    
    /// tip
    
    如果可能,请尽量使用 `Annotated` 版本。
    
    ///
    
    ```Python hl_lines="68-69  81"
    {!> ../../docs_src/websockets/tutorial002.py!}
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/background-tasks.md

    ////
    
    //// tab | Python 3.10+ nicht annotiert
    
    /// tip | "Tipp"
    
    Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
    ///
    
    ```Python hl_lines="11  13  20  23"
    {!> ../../docs_src/background_tasks/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ nicht annotiert
    
    /// tip | "Tipp"
    
    Bevorzugen Sie die `Annotated`-Version, falls möglich.
    
    ///
    
    ```Python hl_lines="13  15  22  25"
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  8. docs/zh/docs/tutorial/body.md

    ```Python hl_lines="2"
    {!> ../../docs_src/body/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="4"
    {!> ../../docs_src/body/tutorial001.py!}
    ```
    
    ////
    
    ## 创建数据模型
    
    把数据模型声明为继承 `BaseModel` 的类。
    
    使用 Python 标准类型声明所有属性:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="5-9"
    {!> ../../docs_src/body/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/body.md

    ///
    
    ## Das Modell verwenden
    
    Innerhalb der Funktion können Sie alle Attribute des Modells direkt verwenden:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="19"
    {!> ../../docs_src/body/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="21"
    {!> ../../docs_src/body/tutorial002.py!}
    ```
    
    ////
    
    ## Requestbody- + Pfad-Parameter
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/extra-models.md

    //// tab | Python 3.10+
    
    ```Python hl_lines="7  13-14  17-18  21-22"
    {!> ../../docs_src/extra_models/tutorial002_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python hl_lines="9  15-16  19-20  23-24"
    {!> ../../docs_src/extra_models/tutorial002.py!}
    ```
    
    ////
    
    ## `Union` или `anyOf`
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top