Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for com (0.17 sec)

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

    Pydantic models have a `.dict()` method that returns a `dict` with the model's data.
    
    So, if we create a Pydantic object `user_in` like:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    and then we call:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    we now have a `dict` with the data in the variable `user_dict` (it's a `dict` instead of a Pydantic model object).
    
    And if we call:
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  2. docs/em/docs/tutorial/extra-models.md

    ```
    
    & โคด๏ธ ๐Ÿ‘ฅ ๐Ÿค™:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    ๐Ÿ‘ฅ ๐Ÿ”œ โœ”๏ธ `dict` โฎ๏ธ ๐Ÿ’ฝ ๐Ÿ”ข `user_dict` (โšซ๏ธ `dict` โ†ฉ๏ธ Pydantic ๐Ÿท ๐ŸŽš).
    
    & ๐Ÿšฅ ๐Ÿ‘ฅ ๐Ÿค™:
    
    ```Python
    print(user_dict)
    ```
    
    ๐Ÿ‘ฅ ๐Ÿ”œ ๐Ÿคš ๐Ÿ `dict` โฎ๏ธ:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': 'john.doe@example.com',
        'full_name': None,
    }
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.8K bytes
    - Viewed (0)
Back to top