Skip to main content

ComputedFieldInfo

A container for data from @computed_field so that we can access it while building the pydantic-core schema.

Attributes

AttributeTypeDescription
decorator_reprClassVar[str] = '@computed_field'A class variable representing the decorator string, '@computed_field'.
wrapped_propertypropertyThe wrapped computed field property.
return_typeAnyThe type of the computed field property's return value.
alias`strNone`
alias_priority`intNone`
exclude_if`Callable[[Any], bool]None`
title`strNone`
field_title_generator`Callable[[str, ComputedFieldInfo], str]None`
description`strNone`
deprecated`Deprecatedstr
examples`list[Any]None`
json_schema_extra`JsonDictCallable[[JsonDict], None]
reprboolA 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

TypeDescription
`strNone`