faust.types.tables
¶
- class faust.types.tables.CollectionT(app: _AppT, *, name: Optional[str] = None, default: Optional[Callable[[], Any]] = None, store: Optional[Union[str, URL]] = None, schema: Optional[_SchemaT] = None, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, partitions: Optional[int] = None, window: Optional[WindowT] = None, changelog_topic: Optional[TopicT] = None, help: Optional[str] = None, on_recover: Optional[Callable[[], Awaitable[None]]] = None, on_changelog_event: Optional[Callable[[EventT], Awaitable[None]]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: Optional[int] = None, extra_topic_configs: Optional[Mapping[str, Any]] = None, options: Optional[Mapping[str, Any]] = None, use_partitioner: bool = False, on_window_close: Optional[Callable[[Any, Any], Union[None, Awaitable[None]]]] = None, **kwargs: Any)[source]¶
- app: _AppT¶
- abstract persisted_offset(tp: TP) Optional[int] [source]¶
- Return type:
_UnionGenericAlias
[int
,None
]
- abstract send_changelog(partition: Optional[int], key: Any, value: Any, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None) FutureMessage [source]¶
- Return type:
- abstract partition_for_key(key: Any) Optional[int] [source]¶
- Return type:
_UnionGenericAlias
[int
,None
]
- abstract async on_rebalance(assigned: Set[TP], revoked: Set[TP], newly_assigned: Set[TP], generation_id: int = 0) None [source]¶
- Return type:
None
- abstract on_recover(fun: Callable[[], Awaitable[None]]) Callable[[], Awaitable[None]] [source]¶
- Return type:
_CallableGenericAlias
[_GenericAlias
[None
]]
- abstract async on_recovery_completed(active_tps: Set[TP], standby_tps: Set[TP]) None [source]¶
- Return type:
None
- abstract using_window(window: WindowT, *, key_index: bool = False) WindowWrapperT [source]¶
- Return type:
- abstract hopping(size: Union[timedelta, float, str], step: Union[timedelta, float, str], expires: Optional[Union[timedelta, float, str]] = None, key_index: bool = False) WindowWrapperT [source]¶
- Return type:
- abstract tumbling(size: Union[timedelta, float, str], expires: Optional[Union[timedelta, float, str]] = None, key_index: bool = False) WindowWrapperT [source]¶
- Return type:
- Diag: Type[DiagT]¶
- diag: DiagT¶
- async_exit_stack: AsyncExitStack¶
- exit_stack: ExitStack¶
- class faust.types.tables.TableT(app: _AppT, *, name: Optional[str] = None, default: Optional[Callable[[], Any]] = None, store: Optional[Union[str, URL]] = None, schema: Optional[_SchemaT] = None, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, partitions: Optional[int] = None, window: Optional[WindowT] = None, changelog_topic: Optional[TopicT] = None, help: Optional[str] = None, on_recover: Optional[Callable[[], Awaitable[None]]] = None, on_changelog_event: Optional[Callable[[EventT], Awaitable[None]]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: Optional[int] = None, extra_topic_configs: Optional[Mapping[str, Any]] = None, options: Optional[Mapping[str, Any]] = None, use_partitioner: bool = False, on_window_close: Optional[Callable[[Any, Any], Union[None, Awaitable[None]]]] = None, **kwargs: Any)[source]¶
- class faust.types.tables.GlobalTableT(app: _AppT, *, name: Optional[str] = None, default: Optional[Callable[[], Any]] = None, store: Optional[Union[str, URL]] = None, schema: Optional[_SchemaT] = None, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, partitions: Optional[int] = None, window: Optional[WindowT] = None, changelog_topic: Optional[TopicT] = None, help: Optional[str] = None, on_recover: Optional[Callable[[], Awaitable[None]]] = None, on_changelog_event: Optional[Callable[[EventT], Awaitable[None]]] = None, recovery_buffer_size: int = 1000, standby_buffer_size: Optional[int] = None, extra_topic_configs: Optional[Mapping[str, Any]] = None, options: Optional[Mapping[str, Any]] = None, use_partitioner: bool = False, on_window_close: Optional[Callable[[Any, Any], Union[None, Awaitable[None]]]] = None, **kwargs: Any)[source]¶
- class faust.types.tables.TableManagerT(app: _AppT, **kwargs: Any)[source]¶
- app: _AppT¶
- abstract add(table: CollectionT) CollectionT [source]¶
- Return type:
- abstract persist_offset_on_commit(store: StoreT, tp: TP, offset: int) None [source]¶
- Return type:
None
- abstract async on_rebalance(assigned: Set[TP], revoked: Set[TP], newly_assigned: Set[TP], generation_id: int = 0) None [source]¶
- Return type:
None
- Diag: Type[DiagT]¶
- diag: DiagT¶
- async_exit_stack: AsyncExitStack¶
- exit_stack: ExitStack¶
- data: MutableMapping[KT, VT]¶
- class faust.types.tables.WindowSetT(key: KT, table: TableT, wrapper: WindowWrapperT, event: Optional[EventT] = None)[source]¶
- class faust.types.tables.WindowedItemsViewT(mapping: WindowWrapperT, event: Optional[EventT] = None)[source]¶
- class faust.types.tables.WindowedValuesViewT(mapping: WindowWrapperT, event: Optional[EventT] = None)[source]¶
- class faust.types.tables.WindowWrapperT(table: TableT, *, relative_to: Optional[Union[_FieldDescriptorT, Callable[[Optional[EventT]], Union[float, datetime]], datetime, float]] = None, key_index: bool = False, key_index_table: Optional[TableT] = None)[source]¶
-
- abstract clone(relative_to: Optional[Union[_FieldDescriptorT, Callable[[Optional[EventT]], Union[float, datetime]], datetime, float]]) WindowWrapperT [source]¶
- Return type:
- abstract relative_to_now() WindowWrapperT [source]¶
- Return type:
- abstract relative_to_field(field: _FieldDescriptorT) WindowWrapperT [source]¶
- Return type:
- abstract relative_to_stream() WindowWrapperT [source]¶
- Return type: