Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for model_copy (0.41 sec)

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

    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()`.
    
    The examples here use `.copy()` for compatibility with Pydantic v1, but you should use `.model_copy()` instead if you can use Pydantic v2.
    
    ///
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 4.7K bytes
    - Viewed (0)
Back to top