Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 116 for pydantic (0.9 sec)

  1. docs/en/docs/tutorial/body.md

    {* ../../docs_src/body/tutorial002_py310.py *}
    
    /// 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.
    
    ///
    
    ## Request body + path parameters { #request-body-path-parameters }
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 10:58:56 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/extra-models.md

    
    /// 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.
    
    ///
    
    ### About `**user_in.dict()` { #about-user-in-dict }
    
    #### Pydantic's `.dict()` { #pydantics-dict }
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/dataclasses.md

    So, even with the code above that doesn't use Pydantic explicitly, FastAPI is using Pydantic to convert those standard dataclasses to Pydantic's own flavor of dataclasses.
    
    And of course, it supports the same:
    
    * data validation
    * data serialization
    * data documentation, etc.
    
    This works the same way as with Pydantic models. And it is actually achieved in the same way underneath, using Pydantic.
    
    /// info
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/query-param-models.md

    This would allow you to **re-use the model** in **multiple places** and also to declare validations and metadata for all the parameters at once. 😎
    
    /// note
    
    This is supported since FastAPI version `0.115.0`. 🤓
    
    ///
    
    ## Query Parameters with a Pydantic Model { #query-parameters-with-a-pydantic-model }
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/schema-extra-example.md

    Here are several ways to do it.
    
    ## Extra JSON Schema data in Pydantic models { #extra-json-schema-data-in-pydantic-models }
    
    You can declare `examples` for a Pydantic model that will be added to the generated JSON Schema.
    
    //// tab | Pydantic v2
    
    {* ../../docs_src/schema_extra_example/tutorial001_py310.py hl[13:24] *}
    
    ////
    
    //// tab | Pydantic v1
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/body-updates.md

    ### Using Pydantic's `update` parameter { #using-pydantics-update-parameter }
    
    Now, you can create a copy of the existing model using `.model_copy()`, and pass the `update` parameter with a `dict` containing the data to update.
    
    /// info
    
    In Pydantic v1 the method was called `.copy()`, it was deprecated (but still supported) in Pydantic v2, and renamed to `.model_copy()`.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  7. docs/en/docs/advanced/settings.md

    ## Pydantic `Settings` { #pydantic-settings }
    
    Fortunately, Pydantic provides a great utility to handle these settings coming from environment variables with <a href="https://docs.pydantic.dev/latest/concepts/pydantic_settings/" class="external-link" target="_blank">Pydantic: Settings management</a>.
    
    ### Install `pydantic-settings` { #install-pydantic-settings }
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/response-model.md

        "price": 50.2
    }
    ```
    
    /// 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.
    
    ///
    
    /// info
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 16K bytes
    - Viewed (0)
  9. docs/uk/docs/tutorial/header-param-models.md

    Це дозволить Вам повторно **використовувати модель** в **різних місцях**, а також оголосити валідації та метадані для всіх параметрів одночасно. 😎
    
    /// note | Нотатки
    
    Ця можливість підтримується починаючи з версії FastAPI `0.115.0`. 🤓
    
    ///
    
    ## Параметри Заголовків з Використанням Pydantic Model
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Wed Mar 19 17:03:13 UTC 2025
    - 3K bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/request-form-models.md

    ///
    
    ## Pydantic-модель для формы
    
    Вам просто нужно объявить **Pydantic-модель** с полями, которые вы хотите получить как **поля формы**, а затем объявить параметр как `Form`:
    
    {* ../../docs_src/request_form_models/tutorial001_an_py39.py hl[9:11,15] *}
    
    **FastAPI** **извлечёт** данные для **каждого поля** из **данных формы** в запросе и выдаст вам объявленную Pydantic-модель.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Fri May 30 13:17:36 UTC 2025
    - 3.3K bytes
    - Viewed (0)
Back to top