Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 263 for embody (0.24 sec)

  1. docs/ja/docs/tutorial/body.md

    <img src="/img/tutorial/body/image01.png">
    
    そして、それらが使われる *パスオペレーション* のそれぞれのAPIドキュメントにも表示されます:
    
    <img src="/img/tutorial/body/image02.png">
    
    ## エディターサポート
    
    エディターによる型ヒントと補完が関数内で利用できます (Pydanticモデルではなく `dict` を受け取ると、同じサポートは受けられません):
    
    <img src="/img/tutorial/body/image03.png">
    
    型によるエラーチェックも可能です:
    
    <img src="/img/tutorial/body/image04.png">
    
    これは偶然ではなく、このデザインに基づいてフレームワークが作られています。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  2. docs/fr/docs/tutorial/body.md

    ```Python hl_lines="4"
    {!../../../docs_src/body/tutorial001.py!}
    ```
    
    ## Créez votre modèle de données
    
    Déclarez ensuite votre modèle de données en tant que classe qui hérite de `BaseModel`.
    
    Utilisez les types Python standard pour tous les attributs :
    
    ```Python hl_lines="7-11"
    {!../../../docs_src/body/tutorial001.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/body-multiple-params.md

    ```Python
    item: Item = Body(embed=True)
    ```
    
    so wie in:
    
    === "Python 3.10+"
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    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)
  4. docs/zh/docs/tutorial/body-multiple-params.md

    但是,如果你希望它期望一个拥有 `item` 键并在值中包含模型内容的 JSON,就像在声明额外的请求体参数时所做的那样,则可以使用一个特殊的 `Body` 参数 `embed`:
    
    ```Python
    item: Item = Body(embed=True)
    ```
    
    比如:
    
    === "Python 3.10+"
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/body_multiple_params/tutorial005_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="17"
        {!> ../../../docs_src/body_multiple_params/tutorial005_an_py39.py!}
        ```
    
    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/em/docs/tutorial/body-fields.md

    🎏 🌌 👆 💪 📣 🌖 🔬 &amp; 🗃 *➡ 🛠️ 🔢* 🔢 ⏮️ `Query`, `Path` &amp; `Body`, 👆 💪 📣 🔬 &amp; 🗃 🔘 Pydantic 🏷 ⚙️ Pydantic `Field`.
    
    ## 🗄 `Field`
    
    🥇, 👆 ✔️ 🗄 ⚫️:
    
    === "🐍 3️⃣.6️⃣ &amp; 🔛"
    
        ```Python hl_lines="4"
        {!> ../../../docs_src/body_fields/tutorial001.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ &amp; 🔛"
    
        ```Python hl_lines="2"
        {!> ../../../docs_src/body_fields/tutorial001_py310.py!}
        ```
    
    !!! warning
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/body-updates.md

        ```Python hl_lines="28-33"
        {!> ../../../docs_src/body_updates/tutorial001_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="30-35"
        {!> ../../../docs_src/body_updates/tutorial001_py39.py!}
        ```
    
    === "Python 3.6+"
    
        ```Python hl_lines="30-35"
        {!> ../../../docs_src/body_updates/tutorial001.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 13:55:32 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body-nested-models.md

    # Body - Nested Models
    
    With **FastAPI**, you can define, validate, document, and use arbitrarily deeply nested models (thanks to Pydantic).
    
    ## List fields
    
    You can define an attribute to be a subtype. For example, a Python `list`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  8. docs/ko/docs/tutorial/body-nested-models.md

    ```Python hl_lines="14"
    {!../../../docs_src/body_nested_models/tutorial001.py!}
    ```
    
    이는 `tags`를 항목 리스트로 만듭니다. 각 항목의 타입을 선언하지 않더라도요.
    
    ## 타입 매개변수가 있는 리스트 필드
    
    하지만 파이썬은 내부의 타입이나 "타입 매개변수"를 선언할 수 있는 특정 방법이 있습니다:
    
    ### typing의 `List` 임포트
    
    먼저, 파이썬 표준 `typing` 모듈에서 `List`를 임포트합니다:
    
    ```Python hl_lines="1"
    {!../../../docs_src/body_nested_models/tutorial002.py!}
    ```
    
    ### 타입 매개변수로 `List` 선언
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  9. tests/test_required_noneable.py

    
    def test_required_nonable_body_embed_no_content():
        response = client.post("/body-embed")
        assert response.status_code == 422
    
    
    def test_required_nonable_body_embed_invalid():
        response = client.post("/body-embed", json={"invalid": "invalid"})
        assert response.status_code == 422
    
    
    def test_required_noneable_body_embed_value():
        response = client.post("/body-embed", json={"b": "foo"})
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 19:08:31 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  10. docs_src/body_fields/tutorial001_py310.py

    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = Field(
            default=None, title="The description of the item", max_length=300
        )
        price: float = Field(gt=0, description="The price must be greater than zero")
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 523 bytes
    - Viewed (0)
Back to top