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
-
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.
-
unassigned
= False¶
-
on_configured
(sender: T_contra = None, *args, **kwargs) → None = <SyncSignal: AppT.>¶
-
on_before_configured
(sender: T_contra = None, *args, **kwargs) → None = <SyncSignal: AppT.>¶
-
on_after_configured
(sender: T_contra = None, *args, **kwargs) → None = <SyncSignal: AppT.>¶
-
on_partitions_assigned
(sender: T_contra = None, *args, **kwargs) → None = <Signal: AppT.>¶
-
on_partitions_revoked
(sender: T_contra = None, *args, **kwargs) → None = <Signal: AppT.>¶
-
on_worker_init
(sender: T_contra = None, *args, **kwargs) → None = <SyncSignal: AppT.>¶
-
config_from_object
(obj: Any, *, silent: bool = False, force: bool = False) → None[source]¶ Return type: None
-
discover
(*extra_modules, categories: Iterable[str] = ('a', 'b', 'c'), ignore: Iterable[str] = ('foo', 'bar')) → None[source]¶ Return type: None
-
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, NoneType] = None, value_serializer: Union[faust.types.codecs.CodecT, str, NoneType] = 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, loop: asyncio.events.AbstractEventLoop = None) → faust.types.topics.TopicT[source]¶ Return type: TopicT
[]
-
channel
(*, key_type: faust.types.app.ModelArg = None, value_type: faust.types.app.ModelArg = None, maxsize: int = 1, loop: asyncio.events.AbstractEventLoop = None) → faust.types.channels.ChannelT[source]¶ Return type: ChannelT
[]
-
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[_ForwardRef('AgentT'), faust.types.channels.ChannelT, typing.Callable[[typing.Any], typing.Union[typing.Awaitable, NoneType]]]] = None, isolated_partitions: bool = False, **kwargs) → Callable[Callable[Union[typing.AsyncIterator, faust.types.streams.StreamT], Union[typing.Awaitable, typing.AsyncIterable]], faust.types.agents.AgentT][source]¶ Return type: Callable
[[Callable
[[Union
[AsyncIterator
[+T_co],StreamT
[+T_co]]],Union
[Awaitable
[+T_co],AsyncIterable
[+T_co]]]],AgentT
[]]
-
task
(fun: Union[typing.Callable[[_ForwardRef('AppT')], typing.Awaitable], typing.Callable[[], typing.Awaitable]]) → Callable[source]¶ Return type: Callable
-
timer
(interval: Union[datetime.timedelta, float, str], on_leader: bool = False) → Callable[source]¶ Return type: Callable
-
service
(cls: Type[mode.types.services.ServiceT]) → Type[mode.types.services.ServiceT][source]¶ Return type: Type
[ServiceT
[]]
-
stream
(channel: AsyncIterable, beacon: mode.utils.types.trees.NodeT = None, **kwargs) → faust.types.streams.StreamT[source]¶ Return type: StreamT
[+T_co]
-
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
[]
-
page
(path: str, *, base: Type[faust.types.web.View] = <class 'faust.types.web.View'>) → Callable[Union[typing.Type[faust.types.web.View], typing.Callable[[faust.types.web.View, faust.types.web.Request], typing.Awaitable[faust.types.web.Response]]], Type[faust.types.web.Site]][source]¶ Return type: Callable
[[Union
[Type
[View
],Callable
[[View
,Request
],Awaitable
[Response
]]]],Type
[Site
]]
-
table_route
(table: faust.types.tables.CollectionT, shard_param: str) → Callable[Callable[[faust.types.web.View, faust.types.web.Request], Awaitable[faust.types.web.Response]], Callable[[faust.types.web.View, faust.types.web.Request], Awaitable[faust.types.web.Response]]][source]¶ Return type: Callable
[[Callable
[[View
,Request
],Awaitable
[Response
]]],Callable
[[View
,Request
],Awaitable
[Response
]]]
-
command
(*options, base: Type[faust.types.app.AppCommand] = None, **kwargs) → Callable[Callable, Type[faust.types.app.AppCommand]][source]¶ Return type: Callable
[[Callable
],Type
[AppCommand
]]
-
FlowControlQueue
(maxsize: int = None, *, clear_on_resume: bool = False, loop: asyncio.events.AbstractEventLoop = None) → mode.utils.queues.ThrowableQueue[source]¶ Return type: ThrowableQueue
-
conf
¶
-
transport
¶
-
producer
¶
-
consumer
¶
-
monitor
¶
-
http_client
¶
-
assignor
¶
-
router
¶
-
coroutine
send
(self, channel: Union[faust.types.channels.ChannelT, str], key: Union[bytes, faust.types.core.ModelT, typing.Any, NoneType] = None, value: Union[bytes, faust.types.core.ModelT, typing.Any] = None, partition: int = None, key_serializer: Union[faust.types.codecs.CodecT, str, NoneType] = None, value_serializer: Union[faust.types.codecs.CodecT, str, NoneType] = None, callback: Callable[faust.types.tuples.FutureMessage, Union[NoneType, typing.Awaitable[NoneType]]] = None) → Awaitable[faust.types.tuples.RecordMetadata][source]¶ Return type: Awaitable
[RecordMetadata
]
-
serializers
¶
-