faust.types.app

class faust.types.app.AppT(id: str, *, monitor: faust.types.app._Monitor, config_source: Any = None, **options) → None[source]

Abstract type for the Faust application.

See also

faust.App.

finalized = False

Set to true when the app is finalized (can read configuration).

configured = False

Set to true when the app has read configuration.

rebalancing = False

Set to true if the worker is currently rebalancing.

rebalancing_count = 0
unassigned = False
in_worker = False
on_configured(*args, **kwargs) → None = <SyncSignal: AppT.on_configured>
on_before_configured(*args, **kwargs) → None = <SyncSignal: AppT.on_before_configured>
on_after_configured(*args, **kwargs) → None = <SyncSignal: AppT.on_after_configured>
on_partitions_assigned(*args, **kwargs) → None = <Signal: AppT.on_partitions_assigned>
on_partitions_revoked(*args, **kwargs) → None = <Signal: AppT.on_partitions_revoked>
on_rebalance_complete(*args, **kwargs) → None = <Signal: AppT.on_rebalance_complete>
on_before_shutdown(*args, **kwargs) → None = <Signal: AppT.on_before_shutdown>
on_worker_init(*args, **kwargs) → None = <SyncSignal: AppT.on_worker_init>
on_produce_message(*args, **kwargs) → None = <SyncSignal: AppT.on_produce_message>
abstract config_from_object(obj: Any, *, silent: bool = False, force: bool = False) → None[source]
Return type

None

abstract finalize() → None[source]
Return type

None

abstract main() → NoReturn[source]
Return type

_NoReturn

abstract worker_init() → None[source]
Return type

None

abstract discover(*extra_modules, categories: Iterable[str] = ('a', 'b', 'c'), ignore: Iterable[Any] = ('foo', 'bar')) → None[source]
Return type

None

abstract topic(*topics, pattern: Union[str, Pattern[~AnyStr]] = None, key_type: faust.types.app._ModelArg = None, value_type: faust.types.app._ModelArg = None, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, partitions: int = None, retention: Union[datetime.timedelta, float, str] = None, compacting: bool = None, deleting: bool = None, replicas: int = None, acks: bool = True, internal: bool = False, config: Mapping[str, Any] = None, maxsize: int = None, allow_empty: bool = False, loop: asyncio.events.AbstractEventLoop = None) → faust.types.topics.TopicT[source]
Return type

TopicT[]

abstract channel(*, key_type: faust.types.app._ModelArg = None, value_type: faust.types.app._ModelArg = None, maxsize: int = None, loop: asyncio.events.AbstractEventLoop = None) → faust.types.channels.ChannelT[source]
Return type

ChannelT[]

abstract agent(channel: Union[str, faust.types.channels.ChannelT] = None, *, name: str = None, concurrency: int = 1, supervisor_strategy: Type[mode.types.supervisors.SupervisorStrategyT] = None, sink: Iterable[Union[AgentT, faust.types.channels.ChannelT, Callable[Any, Optional[Awaitable]]]] = None, isolated_partitions: bool = False, use_reply_headers: bool = False, **kwargs) → Callable[Callable[faust.types.streams.StreamT, Union[Coroutine[[Any, Any], None], Awaitable[None], AsyncIterable]], faust.types.agents.AgentT][source]
Return type

Callable[[Callable[[StreamT[+T_co]], Union[Coroutine[Any, Any, None], Awaitable[None], AsyncIterable[+T_co]]]], AgentT[]]

abstract task(fun: Union[Callable[AppT, Awaitable], Callable[Awaitable]], *, on_leader: bool = False, traced: bool = True) → Callable[source]
abstract timer(interval: Union[datetime.timedelta, float, str], on_leader: bool = False, traced: bool = True, name: str = None, max_drift_correction: float = 0.1) → Callable[source]
Return type

Callable

abstract crontab(cron_format: str, *, timezone: datetime.tzinfo = None, on_leader: bool = False, traced: bool = True) → Callable[source]
Return type

Callable

abstract service(cls: Type[mode.types.services.ServiceT]) → Type[mode.types.services.ServiceT][source]
Return type

Type[ServiceT[]]

abstract stream(channel: AsyncIterable, beacon: mode.utils.types.trees.NodeT = None, **kwargs) → faust.types.streams.StreamT[source]
Return type

StreamT[+T_co]

abstract Table(name: str, *, default: Callable[Any] = None, window: faust.types.windows.WindowT = None, partitions: int = None, help: str = None, **kwargs) → faust.types.tables.TableT[source]
Return type

TableT[~KT, ~VT]

abstract SetTable(name: str, *, window: faust.types.windows.WindowT = None, partitions: int = None, start_manager: bool = False, help: str = None, **kwargs) → faust.types.tables.TableT[source]
Return type

TableT[~KT, ~VT]

abstract page(path: str, *, base: Type[faust.types.web.View] = <class 'faust.types.web.View'>, cors_options: Mapping[str, faust.types.web.ResourceOptions] = None, name: str = None) → Callable[Union[Type[faust.types.web.View], Callable[[faust.types.web.View, faust.types.web.Request], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]], Callable[[faust.types.web.View, faust.types.web.Request, Any, Any], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]]], Type[faust.types.web.View]][source]
Return type

Callable[[Union[Type[View], Callable[[View, Request], Union[Coroutine[Any, Any, Response], Awaitable[Response]]], Callable[[View, Request, Any, Any], Union[Coroutine[Any, Any, Response], Awaitable[Response]]]]], Type[View]]

abstract table_route(table: faust.types.tables.CollectionT, shard_param: str = None, *, query_param: str = None, match_info: str = None, exact_key: str = None) → Callable[Union[Callable[[faust.types.web.View, faust.types.web.Request], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]], Callable[[faust.types.web.View, faust.types.web.Request, Any, Any], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]]], Union[Callable[[faust.types.web.View, faust.types.web.Request], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]], Callable[[faust.types.web.View, faust.types.web.Request, Any, Any], Union[Coroutine[[Any, Any], faust.types.web.Response], Awaitable[faust.types.web.Response]]]]][source]
Return type

Callable[[Union[Callable[[View, Request], Union[Coroutine[Any, Any, Response], Awaitable[Response]]], Callable[[View, Request, Any, Any], Union[Coroutine[Any, Any, Response], Awaitable[Response]]]]], Union[Callable[[View, Request], Union[Coroutine[Any, Any, Response], Awaitable[Response]]], Callable[[View, Request, Any, Any], Union[Coroutine[Any, Any, Response], Awaitable[Response]]]]]

abstract command(*options, base: Type[faust.types.app._AppCommand] = None, **kwargs) → Callable[Callable, Type[faust.types.app._AppCommand]][source]
Return type

Callable[[Callable], Type[_AppCommand]]

abstract LiveCheck(**kwargs) → faust.types.app._LiveCheck[source]
Return type

_LiveCheck

maybe_start_producer[source]
abstract is_leader() → bool[source]
Return type

bool

abstract FlowControlQueue(maxsize: int = None, *, clear_on_resume: bool = False, loop: asyncio.events.AbstractEventLoop = None) → mode.utils.queues.ThrowableQueue[source]
Return type

ThrowableQueue

abstract Worker(**kwargs) → faust.types.app._Worker[source]
Return type

_Worker

abstract on_webserver_init(web: faust.types.web.Web) → None[source]
Return type

None

abstract on_rebalance_start() → None[source]
Return type

None

abstract on_rebalance_end() → None[source]
Return type

None

property conf
Return type

_Settings

abstract property transport
Return type

TransportT

abstract property producer_transport
Return type

TransportT

abstract property cache
Return type

CacheBackendT[]

abstract property producer
Return type

ProducerT[]

abstract property consumer
Return type

ConsumerT[]

tables[source]
topics[source]
abstract property monitor
Return type

_Monitor

flow_control[source]
abstract property http_client
Return type

ClientSession

abstract property assignor
Return type

PartitionAssignorT

abstract property router
Return type

RouterT

abstract property serializers
Return type

RegistryT

abstract property web
Return type

Web

abstract property in_transaction
Return type

bool