Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for example (0.23 sec)

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

    # Extra Models
    
    Continuing with the previous example, it will be common to have more than one related model.
    
    This is especially the case for user models, because:
    
    * The **input model** needs to be able to have a password.
    * The **output model** should not have a password.
    * The **database model** would probably need to have a hashed password.
    
    !!! danger
        Never store user's plaintext passwords. Always store a "secure hash" that you can then verify.
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  2. docs/ru/docs/tutorial/extra-models.md

    Поэтому, если мы создадим Pydantic-объект `user_in` таким способом:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    и затем вызовем:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    то теперь у нас есть `dict` с данными модели в переменной `user_dict` (это `dict` вместо объекта Pydantic-модели).
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. docs/pt/docs/tutorial/extra-models.md

    Então, se criarmos um objeto Pydantic `user_in` como:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    e depois chamarmos:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    agora temos um `dict` com os dados na variável `user_dict` (é um `dict` em vez de um objeto de modelo Pydantic).
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/extra-models.md

    `user_in` Pydantic 🏷 🎓 `UserIn`.
    
    Pydantic 🏷 ✔️ `.dict()` 👩‍🔬 👈 📨 `dict` ⏮️ 🏷 💽.
    
    , 🚥 👥 ✍ Pydantic 🎚 `user_in` 💖:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    & ⤴️ 👥 🤙:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    👥 🔜 ✔️ `dict` ⏮️ 💽 🔢 `user_dict` (⚫️ `dict` ↩️ Pydantic 🏷 🎚).
    
    & 🚥 👥 🤙:
    
    ```Python
    print(user_dict)
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/extra-models.md

    ```
    
    就能以如下方式调用:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    现在,变量 `user_dict`中的就是包含数据的**字典**(变量 `user_dict` 是字典,不是 Pydantic 模型对象)。
    
    以如下方式调用:
    
    ```Python
    print(user_dict)
    ```
    
    输出的就是 Python **字典**:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': 'john.doe@example.com',
        'full_name': None,
    }
    ```
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 01:15:53 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/extra-models.md

    Wenn wir also ein Pydantic-Objekt `user_in` erstellen, etwa so:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    und wir rufen seine `.dict()`-Methode auf:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/extra-models.md

    `user_in`は`UserIn`クラスのPydanticモデルです。
    
    Pydanticモデルには、モデルのデータを含む`dict`を返す`.dict()`メソッドがあります。
    
    そこで、以下のようなPydanticオブジェクト`user_in`を作成すると:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    そして呼び出すと:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    これで変数`user_dict`のデータを持つ`dict`ができました。(これはPydanticモデルのオブジェクトの代わりに`dict`です)。
    
    そして呼び出すと:
    
    ```Python
    print(user_dict)
    ```
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jan 15 15:36:32 GMT 2024
    - 6.7K bytes
    - Viewed (0)
Back to top