faust.types.tables

faust.types.tables.RecoverCallback

alias of typing.Callable

faust.types.tables.ChangelogEventCallback

alias of typing.Callable

class faust.types.tables.CollectionT(app: faust.types.tables.AppT, *, name: str = None, default: Callable[Any] = None, store: Union[str, yarl.URL] = None, key_type: faust.types.tables.ModelArg = None, value_type: faust.types.tables.ModelArg = None, partitions: int = None, window: faust.types.windows.WindowT = None, changelog_topic: faust.types.topics.TopicT = None, help: str = None, on_recover: Callable[Awaitable[NoneType]] = None, on_changelog_event: Callable[faust.types.events.EventT, Awaitable[NoneType]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: int = None, extra_topic_configs: Mapping[str, Any] = None, **kwargs) → None[source]
StateStore = None
changelog_topic
apply_changelog_batch(batch: Iterable[faust.types.events.EventT]) → None[source]
Return type:None
persisted_offset(tp: faust.types.tuples.TP) → Union[int, NoneType][source]
Return type:Optional[int]
reset_state() → None[source]
Return type:None
on_recover(fun: Callable[Awaitable[NoneType]]) → Callable[Awaitable[NoneType]][source]
Return type:Callable[[], Awaitable[None]]
coroutine call_recover_callbacks(self) → None[source]
Return type:None
coroutine need_active_standby_for(self, tp: faust.types.tuples.TP) → bool[source]
Return type:bool
coroutine on_changelog_event(self, event: faust.types.events.EventT) → None[source]
Return type:None
coroutine on_partitions_assigned(self, assigned: Set[faust.types.tuples.TP]) → None[source]
Return type:None
coroutine on_partitions_revoked(self, revoked: Set[faust.types.tuples.TP]) → None[source]
Return type:None
faust.types.tables.CollectionTps

alias of typing.MutableMapping

class faust.types.tables.TableT(app: faust.types.tables.AppT, *, name: str = None, default: Callable[Any] = None, store: Union[str, yarl.URL] = None, key_type: faust.types.tables.ModelArg = None, value_type: faust.types.tables.ModelArg = None, partitions: int = None, window: faust.types.windows.WindowT = None, changelog_topic: faust.types.topics.TopicT = None, help: str = None, on_recover: Callable[Awaitable[NoneType]] = None, on_changelog_event: Callable[faust.types.events.EventT, Awaitable[NoneType]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: int = None, extra_topic_configs: Mapping[str, Any] = None, **kwargs) → None[source]
using_window(window: faust.types.windows.WindowT) → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
hopping(size: Union[datetime.timedelta, float, str], step: Union[datetime.timedelta, float, str], expires: Union[datetime.timedelta, float, str] = None) → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
tumbling(size: Union[datetime.timedelta, float, str], expires: Union[datetime.timedelta, float, str] = None) → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
as_ansitable(*, key: str = 'Key', value: str = 'Value', sort: bool = False, sortkey: Callable[Any, Any] = <function TableT.<lambda>>, title: str = 'Title') → str[source]
Return type:str
class faust.types.tables.TableManagerT(app: faust.types.tables.AppT, **kwargs) → None[source]
add(table: faust.types.tables.CollectionT) → faust.types.tables.CollectionT[source]
Return type:CollectionT[]
changelog_topics
coroutine on_partitions_assigned(self, assigned: Set[faust.types.tuples.TP]) → None[source]
Return type:None
coroutine on_partitions_revoked(self, revoked: Set[faust.types.tuples.TP]) → None[source]
Return type:None
class faust.types.tables.ChangelogReaderT(*, beacon: mode.utils.types.trees.NodeT = None, loop: asyncio.events.AbstractEventLoop = None) → None[source]
class faust.types.tables.WindowSetT(key: Any, table: faust.types.tables.TableT, wrapper: faust.types.tables.WindowWrapperT, event: faust.types.events.EventT = None) → None[source]
apply(op: Callable[[Any, Any], Any], value: Any, event: faust.types.events.EventT = None) → faust.types.tables.WindowSetT[source]
Return type:WindowSetT[]
value(event: faust.types.events.EventT = None) → Any[source]
Return type:Any
current(event: faust.types.events.EventT = None) → Any[source]
Return type:Any
now() → Any[source]
Return type:Any
delta(d: Union[datetime.timedelta, float, str], event: faust.types.events.EventT = None) → Any[source]
Return type:Any
class faust.types.tables.WindowWrapperT(table: faust.types.tables.TableT, *, relative_to: Union[faust.types.tables.FieldDescriptorT, typing.Callable[[typing.Union[faust.types.events.EventT, NoneType]], typing.Union[float, datetime.datetime]], datetime.datetime, float, NoneType] = None) → None[source]
name
clone(relative_to: Union[faust.types.tables.FieldDescriptorT, typing.Callable[[typing.Union[faust.types.events.EventT, NoneType]], typing.Union[float, datetime.datetime]], datetime.datetime, float, NoneType]) → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
relative_to_now() → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
relative_to_field(field: faust.types.tables.FieldDescriptorT) → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
relative_to_stream() → faust.types.tables.WindowWrapperT[source]
Return type:WindowWrapperT[]
get_timestamp(event: faust.types.events.EventT = None) → float[source]
Return type:float
get_relative_timestamp