Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 5 of 5 for model_copy (0.08 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

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

    Ahora, puedes crear una copia del modelo existente usando `.model_copy()`, y pasar el parámetro `update` con un `dict` que contenga los datos a actualizar.
    
    /// info | Información
    
    En Pydantic v1 el método se llamaba `.copy()`, fue deprecado (pero aún soportado) en Pydantic v2, y renombrado a `.model_copy()`.
    
    Los ejemplos aquí usan `.copy()` para compatibilidad con Pydantic v1, pero deberías usar `.model_copy()` si puedes usar Pydantic v2.
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 16 16:33:45 GMT 2025
    - 5.1K bytes
    - Click Count (0)
  2. docs_src/body_updates/tutorial002_py39.py

    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.model_dump(exclude_unset=True)
        updated_item = stored_item_model.model_copy(update=update_data)
        items[item_id] = jsonable_encoder(updated_item)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1K bytes
    - Click Count (0)
  3. docs_src/body_updates/tutorial002_py310.py

    async def update_item(item_id: str, item: Item):
        stored_item_data = items[item_id]
        stored_item_model = Item(**stored_item_data)
        update_data = item.model_dump(exclude_unset=True)
        updated_item = stored_item_model.model_copy(update=update_data)
        items[item_id] = jsonable_encoder(updated_item)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1022 bytes
    - Click Count (0)
  4. docs/de/docs/tutorial/body-updates.md

    ### Pydantics `update`-Parameter verwenden { #using-pydantics-update-parameter }
    
    Jetzt können Sie eine Kopie des existierenden Modells mittels `.model_copy()` erstellen, wobei Sie dem `update`-Parameter ein `dict` mit den zu ändernden Daten übergeben.
    
    Wie in `stored_item_model.model_copy(update=update_data)`:
    
    {* ../../docs_src/body_updates/tutorial002_py310.py hl[33] *}
    
    ### Rekapitulation zu Teil-Aktualisierungen { #partial-updates-recap }
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 24 10:28:19 GMT 2025
    - 5.1K bytes
    - Click Count (0)
  5. cmd/batch-expire.go

    						failed++
    						if oi, ok := oiCache.Get(toDelCopy[i]); ok {
    							ri.trackCurrentBucketObject(r.Bucket, *oi, false, attempts)
    						}
    						if attempts != retryAttempts {
    							// retry
    							toDel = append(toDel, toDelCopy[i])
    						}
    					} else {
    						stopFn(toDelCopy[i], nil)
    						if oi, ok := oiCache.Get(toDelCopy[i]); ok {
    							ri.trackCurrentBucketObject(r.Bucket, *oi, true, attempts)
    						}
    Created: Sun Dec 28 19:28:13 GMT 2025
    - Last Modified: Tue Apr 22 11:16:32 GMT 2025
    - 23K bytes
    - Click Count (0)
Back to Top