Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 167 for dict (0.36 sec)

  1. docs/pt/docs/tutorial/extra-models.md

    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    seria equivalente a:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...porque `user_in.dict()` é um `dict`, e depois fazemos o Python "desembrulhá-lo" passando-o para UserInDB precedido por `**`.
    
    Então, obtemos um modelo Pydantic a partir dos dados em outro modelo Pydantic.
    
    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)
  2. docs/em/docs/tutorial/extra-models.md

    & 🚥 👥 🤙:
    
    ```Python
    print(user_dict)
    ```
    
    👥 🔜 🤚 🐍 `dict` ⏮️:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': '******@****.***',
        'full_name': None,
    }
    ```
    
    #### 🎁 `dict`
    
    🚥 👥 ✊ `dict` 💖 `user_dict` & 🚶‍♀️ ⚫️ 🔢 (⚖️ 🎓) ⏮️ `**user_dict`, 🐍 🔜 "🎁" ⚫️. ⚫️ 🔜 🚶‍♀️ 🔑 & 💲 `user_dict` 🔗 🔑-💲 ❌.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/extra-models.md

        email = user_dict["email"],
        full_name = user_dict["full_name"],
    )
    ```
    
    #### A Pydantic model from the contents of another
    
    As in the example above we got `user_dict` from `user_in.dict()`, this code:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    would be equivalent to:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  4. docs/de/docs/tutorial/metadata.md

    Sie können mit dem Parameter `openapi_tags` auch zusätzliche Metadaten für die verschiedenen Tags hinzufügen, die zum Gruppieren Ihrer Pfadoperationen verwendet werden.
    
    Es wird eine Liste benötigt, die für jedes Tag ein Dict enthält.
    
    Jedes Dict kann Folgendes enthalten:
    
    * `name` (**erforderlich**): ein `str` mit demselben Tag-Namen, den Sie im Parameter `tags` in Ihren *Pfadoperationen* und `APIRouter`n verwenden.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:25:38 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/encoder.md

    👆 💪 ⚙️ `jsonable_encoder` 👈.
    
    ⚫️ 📨 🎚, 💖 Pydantic 🏷, & 📨 🎻 🔗 ⏬:
    
    === "🐍 3️⃣.6️⃣ & 🔛"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    === "🐍 3️⃣.1️⃣0️⃣ & 🔛"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    👉 🖼, ⚫️ 🔜 🗜 Pydantic 🏷 `dict`, & `datetime` `str`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/schema-extra-example.md

    ### `Body` com vários `examples`
    
    Alternativamente ao único `example`, você pode passar `examples` usando um `dict` com **vários examples**, cada um com informações extras que serão adicionadas no **OpenAPI** também.
    
    As chaves do `dict` identificam cada exemplo, e cada valor é outro `dict`.
    
    Cada `dict` de exemplo específico em `examples` pode conter:
    
    * `summary`: Pequena descrição do exemplo.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/response-directly.md

    By default, **FastAPI** would automatically convert that return value to JSON using the `jsonable_encoder` explained in [JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}.
    
    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)
  8. docs/en/docs/how-to/async-sql-encode-databases.md

    ### About `{**note.dict(), "id": last_record_id}`
    
    `note` is a Pydantic `Note` object.
    
    `note.dict()` returns a `dict` with its data, something like:
    
    ```Python
    {
        "text": "Some note",
        "completed": False,
    }
    ```
    
    but it doesn't have the `id` field.
    
    So we create a new `dict`, that contains the key-value pairs from `note.dict()` with:
    
    ```Python
    {**note.dict()}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  9. docs/em/docs/advanced/response-directly.md

    # 📨 📨 🔗
    
    🕐❔ 👆 ✍ **FastAPI** *➡ 🛠️* 👆 💪 🛎 📨 🙆 📊 ⚪️➡️ ⚫️: `dict`, `list`, Pydantic 🏷, 💽 🏷, ♒️.
    
    🔢, **FastAPI** 🔜 🔁 🗜 👈 📨 💲 🎻 ⚙️ `jsonable_encoder` 🔬 [🎻 🔗 🔢](../tutorial/encoder.md){.internal-link target=_blank}.
    
    ⤴️, ⛅ 🎑, ⚫️ 🔜 🚮 👈 🎻-🔗 💽 (✅ `dict`) 🔘 `JSONResponse` 👈 🔜 ⚙️ 📨 📨 👩‍💻.
    
    ✋️ 👆 💪 📨 `JSONResponse` 🔗 ⚪️➡️ 👆 *➡ 🛠️*.
    
    ⚫️ 💪 ⚠, 🖼, 📨 🛃 🎚 ⚖️ 🍪.
    
    ## 📨 `Response`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  10. docs/zh/docs/advanced/additional-responses.md

    ## 联合预定义响应和自定义响应
    
    您可能希望有一些应用于许多路径操作的预定义响应,但是你想将不同的路径和自定义的相应组合在一块。
    对于这些情况,你可以使用Python的技术,将 `dict` 与 `**dict_to_unpack` 解包:
    ```Python
    old_dict = {
        "old key": "old value",
        "second old key": "second old value",
    }
    new_dict = {**old_dict, "new key": "new value"}
    ```
    
    这里, new_dict 将包含来自 old_dict 的所有键值对加上新的键值对:
    ```python
    {
        "old key": "old value",
        "second old key": "second old value",
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 09 15:53:39 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top