faust.types.serializers
¶
- class faust.types.serializers.RegistryT(key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = 'json')[source]¶
-
- abstract loads_key(typ: Optional[_ModelArg], key: Optional[bytes], *, serializer: Optional[Union[CodecT, str]] = None) Optional[Union[bytes, _ModelT, Any]] [source]¶
- abstract loads_value(typ: Optional[_ModelArg], value: Optional[bytes], *, serializer: Optional[Union[CodecT, str]] = None) Any [source]¶
- Return type:
- class faust.types.serializers.SchemaT(*, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, allow_empty: Optional[bool] = None)[source]¶
-
- abstract update(*, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, allow_empty: Optional[bool] = None) None [source]¶
- Return type:
None
- abstract loads_key(app: _AppT, message: _Message, *, loads: Optional[Callable] = None, serializer: Optional[Union[CodecT, str]] = None) KT [source]¶
- Return type:
~KT
- abstract loads_value(app: _AppT, message: _Message, *, loads: Optional[Callable] = None, serializer: Optional[Union[CodecT, str]] = None) VT [source]¶
- Return type:
~VT
- abstract dumps_key(app: _AppT, key: Optional[Union[bytes, _ModelT, Any]], *, serializer: Optional[Union[CodecT, str]] = None, headers: Optional[Union[List[Tuple[str, bytes]], MutableMapping[str, bytes]]]) Tuple[Any, Optional[Union[List[Tuple[str, bytes]], MutableMapping[str, bytes]]]] [source]¶
- abstract dumps_value(app: _AppT, value: Union[bytes, _ModelT, Any], *, serializer: Optional[Union[CodecT, str]] = None, headers: Optional[Union[List[Tuple[str, bytes]], MutableMapping[str, bytes]]]) Tuple[Any, Optional[Union[List[Tuple[str, bytes]], MutableMapping[str, bytes]]]] [source]¶
- abstract on_dumps_key_prepare_headers(key: Union[bytes, _ModelT, Any], headers: Optional[Union[List[Tuple[str, bytes]], MutableMapping[str, bytes]]]) Optional[Union[List[Tuple[str, bytes]], MutableMapping[str, bytes]]] [source]¶