Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 260 for dict (0.13 sec)

  1. docs/ru/docs/tutorial/testing.md

    * Передаёте JSON в теле запроса, передав Python-объект (например: `dict`) через именованный параметр `json`.
    * Если же Вам необходимо отправить *форму с данными* вместо JSON, то используйте параметр `data` вместо `json`.
    * Для передачи *заголовков*, передайте объект `dict` через параметр `headers`.
    * Для передачи *cookies* также передайте `dict`, но через параметр `cookies`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/body-nested-models.md

    Вы не могли бы получить такую поддержку редактора, если бы работали напрямую с `dict`, а не с моделями Pydantic.
    
    Но вы также не должны беспокоиться об этом, входящие словари автоматически конвертируются, а ваш вывод также автоматически преобразуется в формат JSON.
    
    ## Тела запросов с произвольными словарями (`dict` )
    
    Вы также можете объявить тело запроса как `dict` с ключами определенного типа и значениями другого типа данных.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/body-updates.md

        ✋️ 👉 🦮 🎦 👆, 🌖 ⚖️ 🌘, ❔ 👫 🎯 ⚙️.
    
    ### ⚙️ Pydantic `exclude_unset` 🔢
    
    🚥 👆 💚 📨 🍕 ℹ, ⚫️ 📶 ⚠ ⚙️ 🔢 `exclude_unset` Pydantic 🏷 `.dict()`.
    
    💖 `item.dict(exclude_unset=True)`.
    
    👈 🔜 🏗 `dict` ⏮️ 🕴 💽 👈 ⚒ 🕐❔ 🏗 `item` 🏷, 🚫 🔢 💲.
    
    ⤴️ 👆 💪 ⚙️ 👉 🏗 `dict` ⏮️ 🕴 💽 👈 ⚒ (📨 📨), 🚫 🔢 💲:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="34"
        {!> ../../../docs_src/body_updates/tutorial002.py!}
    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)
  4. docs/ja/docs/tutorial/body-updates.md

    ### Pydanticの`exclude_unset`パラメータの使用
    
    部分的な更新を受け取りたい場合は、Pydanticモデルの`.dict()`の`exclude_unset`パラメータを使用すると非常に便利です。
    
    `item.dict(exclude_unset=True)`のように。
    
    これにより、`item`モデルの作成時に設定されたデータのみを持つ`dict`が生成され、デフォルト値は除外されます。
    
    これを使うことで、デフォルト値を省略して、設定された(リクエストで送られた)データのみを含む`dict`を生成することができます:
    
    ```Python hl_lines="34"
    {!../../../docs_src/body_updates/tutorial002.py!}
    ```
    
    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)
  5. docs/de/docs/tutorial/encoder.md

    # JSON-kompatibler Encoder
    
    Es gibt Fälle, da möchten Sie einen Datentyp (etwa ein Pydantic-Modell) in etwas konvertieren, das kompatibel mit JSON ist (etwa ein `dict`, eine `list`e, usw.).
    
    Zum Beispiel, wenn Sie es in einer Datenbank speichern möchten.
    
    Dafür bietet **FastAPI** eine Funktion `jsonable_encoder()`.
    
    ## `jsonable_encoder` verwenden
    
    Stellen wir uns vor, Sie haben eine Datenbank `fake_db`, die nur JSON-kompatible Daten entgegennimmt.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:07:21 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  6. docs/ko/docs/tutorial/encoder.md

    같은 방식으로 이 데이터베이스는 Pydantic 모델(속성이 있는 객체)을 받지 않고, `dict` 만을 받습니다.
    
    이를 위해 `jsonable_encoder` 를 사용할 수 있습니다.
    
    Pydantic 모델과 같은 객체를 받고 JSON 호환 가능한 버전으로 반환합니다:
    
    ```Python hl_lines="5  22"
    {!../../../docs_src/encoder/tutorial001.py!}
    ```
    
    이 예시는 Pydantic 모델을 `dict`로, `datetime` 형식을 `str`로 변환합니다.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Dec 08 15:43:31 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/body-nested-models.md

    Sie würden diese Editor-Unterstützung nicht erhalten, wenn Sie direkt mit `dict`, statt mit Pydantic-Modellen arbeiten würden.
    
    Aber Sie müssen sich auch nicht weiter um die Modelle kümmern, hereinkommende Dicts werden automatisch in sie konvertiert. Und was Sie zurückgeben, wird automatisch nach JSON konvertiert.
    
    ## Bodys mit beliebigen `dict`s
    
    Sie können einen Body auch als `dict` deklarieren, mit Schlüsseln eines Typs und Werten eines anderen Typs.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  8. docs/fr/docs/advanced/response-directly.md

    Par défaut, **FastAPI** convertirait automatiquement cette valeur de retour en JSON en utilisant le `jsonable_encoder` expliqué dans [JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}.
    
    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)
  9. docs/tr/docs/python-types.md

    * `items_s` ise her öğesi `bytes` türünde olan bir `set` örneğidir.
    
    #### `Dict`
    
    Bir `dict` tanımlamak için virgülle ayrılmış iki parametre verebilirsiniz.
    
    İlk tip parametresi `dict` değerinin `key` değeri içindir.
    
    İkinci parametre ise `dict` değerinin `value` değeri içindir:
    
    ```Python hl_lines="1  4"
    {!../../../docs_src/python_types/tutorial008.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/body-updates.md

    Like `item.model_dump(exclude_unset=True)`.
    
    !!! info
        In Pydantic v1 the method was called `.dict()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_dump()`.
    
        The examples here use `.dict()` for compatibility with Pydantic v1, but you should use `.model_dump()` instead if you can use Pydantic v2.
    
    That would generate a `dict` with only the data that was set when creating the `item` model, excluding default values.
    
    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)
Back to top