faust.types.models¶
-
faust.types.models.FieldMap¶ alias of
typing.Mapping
-
faust.types.models.CoercionHandler¶ alias of
typing.Callable
-
class
faust.types.models.TypeCoerce(*args, **kwargs)[source]¶ -
property
target¶ Alias for field number 0
-
property
handler¶ Alias for field number 1
-
property
-
class
faust.types.models.TypeInfo(*args, **kwargs)[source]¶ -
property
generic_type¶ Alias for field number 0
-
property
member_type¶ Alias for field number 1
-
property
-
class
faust.types.models.ModelOptions(*args, **kwargs)[source]¶ -
serializer= None¶
-
include_metadata= True¶
-
polymorphic_fields= False¶
-
allow_blessed_key= False¶
-
isodates= False¶
-
decimals= False¶
-
validation= False¶
-
coerce= False¶
-
coercions= None¶
-
date_parser= None¶
-
fields= None¶ Flattened view of __annotations__ in MRO order.
- Type
Index
-
fieldset= None¶ Set of required field names, for fast argument checking.
- Type
Index
-
descriptors= None¶ Mapping of field name to field descriptor.
- Type
Index
-
fieldpos= None¶ Positional argument index to field name. Used by Record.__init__ to map positional arguments to fields.
- Type
Index
-
optionalset= None¶ Set of optional field names, for fast argument checking.
- Type
Index
-
models= None¶ Mapping of fields that are ModelT
- Type
Index
-
modelattrs= None¶
-
field_coerce= None¶ Mapping of fields that need to be coerced. Key is the name of the field, value is the coercion handler function.
- Type
Index
-
defaults= None¶ Mapping of field names to default value.
-
initfield= None¶ Mapping of init field conversion callbacks.
-
polyindex= None¶ Index of field to polymorphic type
-
-
class
faust.types.models.ModelT(*args: Any, **kwargs: Any) → None[source]¶ -
abstract classmethod
from_data(data: Any, *, preferred_type: Type[ModelT] = None) → faust.types.models.ModelT[source]¶ - Return type
-
abstract classmethod
loads(s: bytes, *, default_serializer: Union[faust.types.codecs.CodecT, str, None] = None, serializer: Union[faust.types.codecs.CodecT, str, None] = None) → faust.types.models.ModelT[source]¶ - Return type
-
abstract
dumps(*, serializer: Union[faust.types.codecs.CodecT, str, None] = None) → bytes[source]¶ - Return type
-
abstract
derive(*objects: faust.types.models.ModelT, **fields: Any) → faust.types.models.ModelT[source]¶ - Return type
-
abstract classmethod
-
class
faust.types.models.FieldDescriptorT(*, field: str = None, input_name: str = None, output_name: str = None, type: Type[T] = None, model: Type[faust.types.models.ModelT] = None, required: bool = True, default: T = None, parent: Optional[faust.types.models.FieldDescriptorT] = None, generic_type: Type = None, member_type: Type = None, exclude: bool = None, date_parser: Callable[Any, datetime.datetime] = None, **kwargs: Any) → None[source]¶ -
required= True¶
-
default= None¶
-
abstract
clone(**kwargs: Any) → faust.types.models.FieldDescriptorT[source]¶ - Return type
FieldDescriptorT[~T]
-
abstract
validate_all(value: Any) → Iterable[faust.exceptions.ValidationError][source]¶ - Return type
Iterable[ValidationError]
-
abstract
validate(value: T) → Iterable[faust.exceptions.ValidationError][source]¶ - Return type
Iterable[ValidationError]
-