Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for excludes (0.19 sec)

  1. docs/ru/docs/tutorial/body-updates.md

        Но в данном руководстве более или менее понятно, как они должны использоваться.
    
    ### Использование параметра `exclude_unset` в Pydantic
    
    Если необходимо выполнить частичное обновление, то очень полезно использовать параметр `exclude_unset` в методе `.dict()` модели Pydantic.
    
    Например, `item.dict(exclude_unset=True)`.
    
    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)
  2. docs/zh/docs/tutorial/body-updates.md

        `PATCH` 没有 `PUT` 知名,也怎么不常用。
    
        很多人甚至只用 `PUT` 实现部分更新。
    
        **FastAPI** 对此没有任何限制,可以**随意**互换使用这两种操作。
    
        但本指南也会分别介绍这两种操作各自的用途。
    
    ### 使用 Pydantic 的 `exclude_unset` 参数
    
    更新部分数据时,可以在 Pydantic 模型的 `.dict()` 中使用 `exclude_unset` 参数。
    
    比如,`item.dict(exclude_unset=True)`。
    
    这段代码生成的 `dict` 只包含创建 `item` 模型时显式设置的数据,而不包括默认值。
    
    然后再用它生成一个只含已设置(在请求中所发送)数据,且省略了默认值的 `dict`:
    
    ```Python hl_lines="34"
    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)
  3. docs/de/docs/tutorial/body-updates.md

        Aber dieser Leitfaden zeigt Ihnen mehr oder weniger, wie die beiden normalerweise verwendet werden.
    
    ### Pydantics `exclude_unset`-Parameter verwenden
    
    Wenn Sie Teil-Aktualisierungen entgegennehmen, ist der `exclude_unset`-Parameter in der `.model_dump()`-Methode von Pydantic-Modellen sehr nützlich.
    
    Wie in `item.model_dump(exclude_unset=True)`.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:37 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/body-updates.md

        But this guide shows you, more or less, how they are intended to be used.
    
    ### Using Pydantic's `exclude_unset` parameter
    
    If you want to receive partial updates, it's very useful to use the parameter `exclude_unset` in Pydantic's model's `.model_dump()`.
    
    Like `item.model_dump(exclude_unset=True)`.
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/body-updates.md

         & 📚 🏉 ⚙️ 🕴 `PUT`, 🍕 ℹ.
    
        👆 **🆓** ⚙️ 👫 👐 👆 💚, **FastAPI** 🚫 🚫 🙆 🚫.
    
        ✋️ 👉 🦮 🎦 👆, 🌖 ⚖️ 🌘, ❔ 👫 🎯 ⚙️.
    
    ### ⚙️ Pydantic `exclude_unset` 🔢
    
    🚥 👆 💚 📨 🍕 ℹ, ⚫️ 📶 ⚠ ⚙️ 🔢 `exclude_unset` Pydantic 🏷 `.dict()`.
    
    💖 `item.dict(exclude_unset=True)`.
    
    👈 🔜 🏗 `dict` ⏮️ 🕴 💽 👈 ⚒ 🕐❔ 🏗 `item` 🏷, 🚫 🔢 💲.
    
    ⤴️ 👆 💪 ⚙️ 👉 🏗 `dict` ⏮️ 🕴 💽 👈 ⚒ (📨 📨), 🚫 🔢 💲:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/body-updates.md

        **FastAPI** はどんな制限も課けていないので、それらを使うのは **自由** です。
    
        しかし、このガイドでは、それらがどのように使用されることを意図しているかを多かれ少なかれ、示しています。
    
    ### Pydanticの`exclude_unset`パラメータの使用
    
    部分的な更新を受け取りたい場合は、Pydanticモデルの`.dict()`の`exclude_unset`パラメータを使用すると非常に便利です。
    
    `item.dict(exclude_unset=True)`のように。
    
    これにより、`item`モデルの作成時に設定されたデータのみを持つ`dict`が生成され、デフォルト値は除外されます。
    
    これを使うことで、デフォルト値を省略して、設定された(リクエストで送られた)データのみを含む`dict`を生成することができます:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top