fields - model field types¶
This module contains standard field types.
- class AnyOfField[source]¶
Bases:
Field[Any]Multi-type value.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- models¶
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- class BooleanField[source]¶
Bases:
Field[bool]Boolean value.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class ByteField[source]¶
Bases:
Field[UUID]Byte field.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class DateField[source]¶
Bases:
Field[date]Date.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class DateTimeField[source]¶
Bases:
Field[datetime]Date and time.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- tz: bool¶
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class DecimalField[source]¶
Bases:
IntegerField[Decimal]Decimal number.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- ge: int¶
Validation constraint: provided value must be greater or equal to this number.
- gt: int¶
Validation constraint: provided value must be greater than this number.
- le: int¶
Validation constraint: provided value must be less or equal to this number.
- lt: int¶
Validation constraint: provided value must be less than this number.
- multiple_of: Decimal¶
Validation constraint: provided value must be divisible by this number.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class DecimalFormProperties[source]¶
Bases:
IntegerFormPropertiesDecimal field UI properties.
- disable_label: bool¶
- disabled: bool¶
- extra_params: dict[str, Any]¶
- has_feedback: bool¶
- mark_required: bool¶
- placeholder: str | None¶
- step: Decimal¶
- class EmailField[source]¶
Bases:
StringFieldEmail string.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided string length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided string length must be larger or equal to this number.
- pattern: str¶
Validation constraint: provided string must match this regular expression.
- pattern_error_text: str¶
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class EnumField[source]¶
Bases:
Field[BaseTypeT]Select value.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- options: list[BaseTypeT]¶
Validation constraint: list of possible values.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- class EnumFormProperties[source]¶
Bases:
FormPropertiesSelect value options.
- disable_label: bool¶
- disabled: bool¶
- extra_params: dict[str, Any]¶
- has_feedback: bool¶
- mark_required: bool¶
- option_title: dict[str | int | float, str]¶
- placeholder: str | None¶
- vertical: bool¶
- class IntegerField[source]¶
Bases:
Field[int]Integer number.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- ge: int¶
Validation constraint: provided value must be greater or equal to this number.
- gt: int¶
Validation constraint: provided value must be greater than this number.
- le: int¶
Validation constraint: provided value must be less or equal to this number.
- lt: int¶
Validation constraint: provided value must be less than this number.
- multiple_of: int¶
Validation constraint: provided value must be divisible by this number.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class IntegerFormProperties[source]¶
Bases:
FormPropertiesInteger field UI properties.
- disable_label: bool¶
- disabled: bool¶
- extra_params: dict[str, Any]¶
- has_feedback: bool¶
- mark_required: bool¶
- placeholder: str | None¶
- step: int¶
- class JsonListField[source]¶
Bases:
Field[tuple]Unstructured list field.
- default: list¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided list length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided list length must be larger or equal to this number.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class JsonMapField[source]¶
Bases:
Field[dict[str,Any]]Dictionary field.
- default: dict[str, Any]¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided number of properties must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided number of properties must be larger or equal to this number.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class ListField[source]¶
Bases:
Field[tuple]List of fixed type values.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- field¶
- max_length: int¶
Validation constraint: provided list length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided list length must be larger or equal to this number.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- class MixedListField[source]¶
Bases:
Field[tuple]List of multi-type values.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided list length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided list length must be larger or equal to this number.
- models¶
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- class PasswordField[source]¶
Bases:
StringFieldPassword string.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided string length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided string length must be larger or equal to this number.
- pattern: str¶
Validation constraint: provided string must match this regular expression.
- pattern_error_text: str¶
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class SetField[source]¶
Bases:
ListField[set]Unordered set of values.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- field¶
- max_length: int¶
Validation constraint: provided list length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided list length must be larger or equal to this number.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class StringField[source]¶
Bases:
Field[str]Normal string.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided string length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided string length must be larger or equal to this number.
- pattern: str¶
Validation constraint: provided string must match this regular expression.
- pattern_error_text: str¶
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class TextField[source]¶
Bases:
StringFieldFormatted text.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- max_length: int¶
Validation constraint: provided string length must be smaller or equal to this number.
- min_length: int¶
Validation constraint: provided string length must be larger or equal to this number.
- pattern: str¶
Validation constraint: provided string must match this regular expression.
- pattern_error_text: str¶
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.
- class UUIDField[source]¶
Bases:
Field[UUID]UUID field.
- default: BaseTypeT¶
Default value for this field.
- description: str¶
Field description.
- required: bool¶
Field is required.
- title: str¶
Field short title.
- ui_visible: bool¶
Is this field visible in UI schema.
- validate: Callable[[Any], BaseTypeT]¶
Optional validator function for this field to be called by its parent.
- get_schema() dict[str, Any]¶
Get UI schema for this object.