Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 61 for 22 (0.15 sec)

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

    你可以通过传递额外信息给 `Field` 同样的方式操作`Path`, `Query`, `Body`等。
    
    比如,你可以将请求体的一个 `example` 传递给 `Body`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="22-27"
        {!> ../../../docs_src/schema_extra_example/tutorial003_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="22-27"
        {!> ../../../docs_src/schema_extra_example/tutorial003_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="23-28"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/body-multiple-params.md

    === "Python 3.10+"
    
        ```Python hl_lines="20"
        {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="22"
        {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
        ```
    
    In diesem Fall wird **FastAPI** bemerken, dass es mehr als einen Body-Parameter in der Funktion gibt (zwei Parameter, die Pydantic-Modelle sind).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 29 17:32:43 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/body-multiple-params.md

    === "Python 3.10+"
    
        ```Python hl_lines="20"
        {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="22"
        {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
        ```
    
    Neste caso, o **FastAPI** perceberá que existe mais de um parâmetro de corpo na função (dois parâmetros que são modelos Pydantic).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/body-multiple-params.md

    但是你也可以声明多个请求体参数,例如 `item` 和 `user`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="20"
        {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="22"
        {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
        ```
    
    在这种情况下,**FastAPI** 将注意到该函数中有多个请求体参数(两个 Pydantic 模型参数)。
    
    因此,它将使用参数名称作为请求体中的键(字段名称),并期望一个类似于以下内容的请求体:
    
    ```JSON
    {
        "item": {
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 7.6K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/sql-databases.md

    === "Python 3.9+"
    
        ```Python hl_lines="12-20"
        {!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14-22"
        {!> ../../../docs_src/sql_databases/sql_app/alt_main.py!}
        ```
    
    !!! info
        我们将`SessionLocal()`请求的创建和处理放在一个`try`块中。
    
        然后我们在finally块中关闭它。
    
        通过这种方式,我们确保数据库会话在请求后始终关闭,即使在处理请求时出现异常也会关闭。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/advanced-dependencies.md

    checker(q="somequery")
    ```
    
    ...and pass whatever that returns as the value of the dependency in our *path operation function* as the parameter `fixed_content_included`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="22"
        {!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="21"
        {!> ../../../docs_src/dependencies/tutorial011_an.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. docs/fr/docs/advanced/response-directly.md

    Pour ces cas, vous pouvez spécifier un appel à `jsonable_encoder` pour convertir vos données avant de les passer à une réponse :
    
    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "Détails techniques"
        Vous pouvez aussi utiliser `from starlette.responses import JSONResponse`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/response-directly.md

    In diesen Fällen können Sie den `jsonable_encoder` verwenden, um Ihre Daten zu konvertieren, bevor Sie sie an eine Response übergeben:
    
    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "Technische Details"
        Sie können auch `from starlette.responses import JSONResponse` verwenden.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:36 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/response-directly.md

    For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:
    
    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        You could also use `from starlette.responses import JSONResponse`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 3K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/body-multiple-params.md

    === "Python 3.10+"
    
        ```Python hl_lines="20"
        {!> ../../../docs_src/body_multiple_params/tutorial002_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="22"
        {!> ../../../docs_src/body_multiple_params/tutorial002.py!}
        ```
    
    В этом случае **FastAPI** заметит, что в функции есть более одного параметра тела (два параметра, которые являются моделями Pydantic).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.7K bytes
    - Viewed (0)
Back to top