faust.types.models
¶
- class faust.types.models.FieldDescriptorT(*, field: Optional[str] = None, input_name: Optional[str] = None, output_name: Optional[str] = None, type: Optional[Type[T]] = None, model: Optional[Type[ModelT]] = None, required: bool = True, default: Optional[T] = None, parent: Optional[FieldDescriptorT] = None, exclude: Optional[bool] = None, date_parser: Optional[Callable[[Any], datetime]] = None, **kwargs: Any)[source]¶
-
- parent: Optional[FieldDescriptorT]¶
- abstract clone(**kwargs: Any) FieldDescriptorT [source]¶
- Return type:
- abstract validate_all(value: Any) Iterable[ValidationError] [source]¶
- Return type:
_GenericAlias
[ValidationError
]
- abstract validate(value: T) Iterable[ValidationError] [source]¶
- Return type:
_GenericAlias
[ValidationError
]
- abstract validation_error(reason: str) ValidationError [source]¶
- Return type:
- class faust.types.models.ModelOptions[source]¶
-
- fieldset: FrozenSet[str] = None¶
Set of required field names, for fast argument checking.
- Type:
Index
- descriptors: Mapping[str, FieldDescriptorT] = None¶
Mapping of field name to field descriptor.
- Type:
Index
- fieldpos: Mapping[int, str] = None¶
Positional argument index to field name. Used by Record.__init__ to map positional arguments to fields.
- Type:
Index
- optionalset: FrozenSet[str] = None¶
Set of optional field names, for fast argument checking.
- Type:
Index
- clone_defaults() ModelOptions [source]¶
- Return type:
- class faust.types.models.ModelT(*args: Any, **kwargs: Any)[source]¶
- abstract classmethod from_data(data: Any, *, preferred_type: Optional[Type[ModelT]] = None) ModelT [source]¶
- Return type:
- abstract classmethod loads(s: bytes, *, default_serializer: Optional[Union[CodecT, str]] = None, serializer: Optional[Union[CodecT, str]] = None) ModelT [source]¶
- Return type:
- abstract validate() List[ValidationError] [source]¶
- Return type:
_GenericAlias
[ValidationError
]
- abstract property validation_errors: List[ValidationError]¶
- Return type:
_GenericAlias
[ValidationError
]