faust.stores.base

Base class for table storage drivers.

class faust.stores.base.Store(url: Union[str, yarl.URL], app: faust.types.app.AppT, table: faust.types.tables.CollectionT, *, table_name: str = '', key_type: Union[Type[faust.types.models.ModelT], Type[bytes], Type[str]] = None, value_type: Union[Type[faust.types.models.ModelT], Type[bytes], Type[str]] = None, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Base class for table storage drivers.

persisted_offset(tp: faust.types.tuples.TP) → Optional[int][source]
Return type:Optional[int]
set_persisted_offset(tp: faust.types.tuples.TP, offset: int) → None[source]
Return type:None
label

Label used for graphs. :rtype: str

logger = <Logger faust.stores.base (WARNING)>
coroutine need_active_standby_for(self, tp: faust.types.tuples.TP) → bool[source]
Return type:bool
coroutine on_rebalance(self, table: faust.types.tables.CollectionT, assigned: Set[faust.types.tuples.TP], revoked: Set[faust.types.tuples.TP], newly_assigned: Set[faust.types.tuples.TP]) → None[source]
Return type:None
coroutine on_recovery_completed(self, active_tps: Set[faust.types.tuples.TP], standby_tps: Set[faust.types.tuples.TP]) → None[source]
Return type:None
class faust.stores.base.SerializedStore(url: Union[str, yarl.URL], app: faust.types.app.AppT, table: faust.types.tables.CollectionT, *, table_name: str = '', key_type: Union[Type[faust.types.models.ModelT], Type[bytes], Type[str]] = None, value_type: Union[Type[faust.types.models.ModelT], Type[bytes], Type[str]] = None, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Base class for table storage drivers requiring serialization.

apply_changelog_batch(batch: Iterable[faust.types.events.EventT], to_key: Callable[Any, KT], to_value: Callable[Any, VT]) → None[source]
Return type:None
keys() → collections.abc.KeysView[source]
Return type:KeysView
values() → collections.abc.ValuesView[source]
Return type:ValuesView
items() → collections.abc.ItemsView[source]
Return type:ItemsView
clear() → None[source]
Return type:None
logger = <Logger faust.stores.base (WARNING)>