faust.types.tables

faust.types.tables.RecoverCallback

alias of typing.Callable

faust.types.tables.ChangelogEventCallback

alias of typing.Callable

faust.types.tables.WindowCloseCallback

alias of typing.Callable

faust.types.tables.CollectionTps

alias of typing.MutableMapping

class faust.types.tables.CollectionT(app: faust.types.tables._AppT, *, name: str = None, default: Callable[Any] = None, store: Union[str, yarl.URL] = None, schema: faust.types.tables._SchemaT = 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[None]] = None, on_changelog_event: Callable[faust.types.events.EventT, Awaitable[None]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: int = None, extra_topic_configs: Mapping[str, Any] = None, options: Mapping[str, Any] = None, use_partitioner: bool = False, on_window_close: Callable[[Any, Any], None] = None, **kwargs: Any) → None[source]
abstract property changelog_topic
Return type

TopicT[]

abstract apply_changelog_batch(batch: Iterable[faust.types.events.EventT]) → None[source]
Return type

None

abstract persisted_offset(tp: faust.types.tuples.TP) → Optional[int][source]
Return type

Optional[int]

abstract async need_active_standby_for(tp: faust.types.tuples.TP) → bool[source]
Return type

bool

abstract reset_state() → None[source]
Return type

None

abstract send_changelog(partition: Optional[int], key: Any, value: Any, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None) → faust.types.tuples.FutureMessage[source]
Return type

FutureMessage[]

abstract partition_for_key(key: Any) → Optional[int][source]
Return type

Optional[int]

abstract on_window_close(key: Any, value: Any) → None[source]
Return type

None

abstract async on_rebalance(assigned: Set[faust.types.tuples.TP], revoked: Set[faust.types.tuples.TP], newly_assigned: Set[faust.types.tuples.TP]) → None[source]
Return type

None

abstract async on_changelog_event(event: faust.types.events.EventT) → None[source]
Return type

None

abstract on_recover(fun: Callable[Awaitable[None]]) → Callable[Awaitable[None]][source]
Return type

Callable[[], Awaitable[None]]

abstract async on_recovery_completed(active_tps: Set[faust.types.tuples.TP], standby_tps: Set[faust.types.tuples.TP]) → None[source]
Return type

None

abstract async call_recover_callbacks() → None[source]
Return type

None

class faust.types.tables.TableT(app: faust.types.tables._AppT, *, name: str = None, default: Callable[Any] = None, store: Union[str, yarl.URL] = None, schema: faust.types.tables._SchemaT = 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[None]] = None, on_changelog_event: Callable[faust.types.events.EventT, Awaitable[None]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: int = None, extra_topic_configs: Mapping[str, Any] = None, options: Mapping[str, Any] = None, use_partitioner: bool = False, on_window_close: Callable[[Any, Any], None] = None, **kwargs: Any) → None[source]
abstract using_window(window: faust.types.windows.WindowT, *, key_index: bool = False) → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract hopping(size: Union[datetime.timedelta, float, str], step: Union[datetime.timedelta, float, str], expires: Union[datetime.timedelta, float, str] = None, key_index: bool = False) → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract tumbling(size: Union[datetime.timedelta, float, str], expires: Union[datetime.timedelta, float, str] = None, key_index: bool = False) → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract as_ansitable(**kwargs: Any) → str[source]
Return type

str

class faust.types.tables.GlobalTableT(app: faust.types.tables._AppT, *, name: str = None, default: Callable[Any] = None, store: Union[str, yarl.URL] = None, schema: faust.types.tables._SchemaT = 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[None]] = None, on_changelog_event: Callable[faust.types.events.EventT, Awaitable[None]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: int = None, extra_topic_configs: Mapping[str, Any] = None, options: Mapping[str, Any] = None, use_partitioner: bool = False, on_window_close: Callable[[Any, Any], None] = None, **kwargs: Any) → None[source]
class faust.types.tables.TableManagerT(app: faust.types.tables._AppT, **kwargs: Any) → None[source]
abstract add(table: faust.types.tables.CollectionT) → faust.types.tables.CollectionT[source]
Return type

CollectionT[]

abstract persist_offset_on_commit(store: faust.types.stores.StoreT, tp: faust.types.tuples.TP, offset: int) → None[source]
Return type

None

abstract on_commit(offsets: MutableMapping[faust.types.tuples.TP, int]) → None[source]
Return type

None

abstract async on_rebalance(assigned: Set[faust.types.tuples.TP], revoked: Set[faust.types.tuples.TP], newly_assigned: Set[faust.types.tuples.TP]) → None[source]
Return type

None

abstract property changelog_topics
Return type

Set[str]

class faust.types.tables.WindowSetT(key: KT, table: faust.types.tables.TableT, wrapper: faust.types.tables.WindowWrapperT, event: faust.types.events.EventT = None) → None[source]
abstract apply(op: Callable[[VT, VT], VT], value: VT, event: faust.types.events.EventT = None) → faust.types.tables.WindowSetT[source]
Return type

WindowSetT[~KT, ~VT]

abstract value(event: faust.types.events.EventT = None) → VT[source]
Return type

~VT

abstract current(event: faust.types.events.EventT = None) → VT[source]
Return type

~VT

abstract now() → VT[source]
Return type

~VT

abstract delta(d: Union[datetime.timedelta, float, str], event: faust.types.events.EventT = None) → VT[source]
Return type

~VT

class faust.types.tables.WindowedItemsViewT(mapping: faust.types.tables.WindowWrapperT, event: faust.types.events.EventT = None)[source]
abstract now() → Iterator[Tuple[Any, Any]][source]
Return type

Iterator[Tuple[Any, Any]]

abstract current(event: faust.types.events.EventT = None) → Iterator[Tuple[Any, Any]][source]
Return type

Iterator[Tuple[Any, Any]]

abstract delta(d: Union[datetime.timedelta, float, str], event: faust.types.events.EventT = None) → Iterator[Tuple[Any, Any]][source]
Return type

Iterator[Tuple[Any, Any]]

class faust.types.tables.WindowedValuesViewT(mapping: faust.types.tables.WindowWrapperT, event: faust.types.events.EventT = None)[source]
abstract now() → Iterator[Any][source]
Return type

Iterator[Any]

abstract current(event: faust.types.events.EventT = None) → Iterator[Any][source]
Return type

Iterator[Any]

abstract delta(d: Union[datetime.timedelta, float, str], event: faust.types.events.EventT = None) → Iterator[Any][source]
Return type

Iterator[Any]

class faust.types.tables.WindowWrapperT(table: faust.types.tables.TableT, *, relative_to: Union[faust.types.tables._FieldDescriptorT, Callable[Optional[faust.types.events.EventT], Union[float, datetime.datetime]], datetime.datetime, float, None] = None, key_index: bool = False, key_index_table: faust.types.tables.TableT = None) → None[source]
abstract property name
Return type

str

abstract clone(relative_to: Union[faust.types.tables._FieldDescriptorT, Callable[Optional[faust.types.events.EventT], Union[float, datetime.datetime]], datetime.datetime, float, None]) → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract relative_to_now() → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract relative_to_field(field: faust.types.tables._FieldDescriptorT) → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract relative_to_stream() → faust.types.tables.WindowWrapperT[source]
Return type

WindowWrapperT[]

abstract get_timestamp(event: faust.types.events.EventT = None) → float[source]
Return type

float

abstract keys() → KeysView[source]
Return type

KeysView[~KT]

abstract on_set_key(key: Any, value: Any) → None[source]
Return type

None

abstract on_del_key(key: Any) → None[source]
Return type

None

abstract as_ansitable(**kwargs: Any) → str[source]
Return type

str

property get_relative_timestamp
Return type

Optional[Callable[[Optional[EventT[]]], Union[float, datetime]]]