ComputedFieldInfo
A container for data from @computed_field so that we can access it while building the pydantic-core schema.
Attributes
| Attribute | Type | Description |
|---|---|---|
| decorator_repr | ClassVar[str] = '@computed_field' | A class variable representing the decorator string, '@computed_field'. |
| wrapped_property | property | The wrapped computed field property. |
| return_type | Any | The type of the computed field property's return value. |
| alias | `str | None` |
| alias_priority | `int | None` |
| exclude_if | `Callable[[Any], bool] | None` |
| title | `str | None` |
| field_title_generator | `Callable[[str, ComputedFieldInfo], str] | None` |
| description | `str | None` |
| deprecated | `Deprecated | str |
| examples | `list[Any] | None` |
| json_schema_extra | `JsonDict | Callable[[JsonDict], None] |
| repr | bool | A boolean indicating whether to include the field in the repr output. |
Constructor
Signature
def ComputedFieldInfo()
Methods
deprecation_message()
@classmethod
def deprecation_message() - > str | None
The deprecation message to be emitted, or None if not set.
Returns
| Type | Description |
|---|---|
| `str | None` |