faust.types.models
¶
-
faust.types.models.
CoercionHandler
¶ alias of
typing.Callable
-
class
faust.types.models.
TypeCoerce
(*args, **kwargs)[source]¶ -
target
¶ Alias for field number 0
-
handler
¶ Alias for field number 1
-
-
class
faust.types.models.
ModelOptions
(*args, **kwargs)[source]¶ -
serializer
= None¶
-
include_metadata
= True¶
-
allow_blessed_key
= False¶
-
isodates
= False¶
-
decimals
= False¶
-
coercions
= 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
-
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.
-
-
class
faust.types.models.
ModelT
(*args, **kwargs) → None[source]¶ -
classmethod
from_data
(data: Any, *, preferred_type: Type[ModelT] = None) → faust.types.models.ModelT[source]¶ - Return type
-
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
-
classmethod