computed_field
No overview available.
def computed_field(
func: PropertyT
) - > PropertyT
A decorator used to mark a method or property as a computed field in a Pydantic model, allowing it to be included in the model's serialized output.
Parameters
| Name | Type | Description |
|---|---|---|
| func | PropertyT | The function or property getter to be treated as a computed field. |
Returns
| Type | Description |
|---|---|
PropertyT | The decorated property or method, now registered as a computed field for serialization. |