faust.cli.faust

Program faust (umbrella command).

class faust.cli.faust.agents(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

List agents.

title = 'Agents'
headers = ['name', 'topic', 'help']
sortkey = operator.attrgetter('name')
options = [<function option.<locals>.decorator>]
agents(*, local: bool = False) → Sequence[faust.types.agents.AgentT][source]
Return type:Sequence[AgentT[]]
agent_to_row(agent: faust.types.agents.AgentT) → Sequence[str][source]
Return type:Sequence[str]
coroutine run(self, local: bool) → None[source]
Return type:None
faust.cli.faust.call_command(command: str, args: List[str] = None, stdout: IO = None, stderr: IO = None, side_effects: bool = False, **kwargs) → Tuple[int, IO, IO][source]
Return type:Tuple[int, IO[AnyStr], IO[AnyStr]]
class faust.cli.faust.clean_versions(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Delete old version directories.

Warning

This command will result in the destruction of the following files:

  1. Table data for previous versions of the app.
remove_old_versiondirs() → None[source]
Return type:None
coroutine run(self) → None[source]
Return type:None
class faust.cli.faust.completion(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Output shell completion to be eval’d by the shell.

require_app = False
shell() → str[source]
Return type:str
coroutine run(self) → None[source]
Return type:None
class faust.cli.faust.model(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Show model detail.

headers = ['field', 'type', 'default*']
options = [<function argument.<locals>.decorator>]
model_fields(model: Type[faust.types.models.ModelT]) → Sequence[Sequence[str]][source]
Return type:Sequence[Sequence[str]]
field(field: faust.types.models.FieldDescriptorT) → Sequence[str][source]
Return type:Sequence[str]
model_to_row(model: Type[faust.types.models.ModelT]) → Sequence[str][source]
Return type:Sequence[str]
coroutine run(self, name: str) → None[source]
Return type:None
class faust.cli.faust.models(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

List all available models as a tabulated list.

title = 'Models'
headers = ['name', 'help']
sortkey = operator.attrgetter('_options.namespace')
options = [<function option.<locals>.decorator>]
models(builtins: bool) → Sequence[Type[faust.types.models.ModelT]][source]
Return type:Sequence[Type[ModelT]]
model_to_row(model: Type[faust.types.models.ModelT]) → Sequence[str][source]
Return type:Sequence[str]
coroutine run(self, *, builtins: bool) → None[source]
Return type:None
class faust.cli.faust.reset(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Delete local table state.

Warning

This command will result in the destruction of the following files:

  1. The local database directories/files backing tables (does not apply if an in-memory store like memory:// is used).

Notes

This data is technically recoverable from the Kafka cluster (if intact), but it’ll take a long time to get the data back as you need to consume each changelog topic in total.

It’d be faster to copy the data from any standbys that happen to have the topic partitions you require.

coroutine reset_tables(self) → None[source]
Return type:None
coroutine run(self) → None[source]
Return type:None
class faust.cli.faust.send(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Send message to agent/topic.

options = [<function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function argument.<locals>.decorator>, <function argument.<locals>.decorator>]
coroutine run(self, entity: str, value: str, *args, key: str = None, key_type: str = None, key_serializer: str = None, value_type: str = None, value_serializer: str = None, partition: int = 1, timestamp: float = None, repeat: int = 1, min_latency: float = 0.0, max_latency: float = 0.0, **kwargs) → Any[source]
Return type:Any
class faust.cli.faust.tables(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

List available tables.

title = 'Tables'
coroutine run(self) → None[source]
Return type:None
class faust.cli.faust.worker(ctx: click.core.Context, *args, key_serializer: Union[faust.types.codecs.CodecT, str, None] = None, value_serializer: Union[faust.types.codecs.CodecT, str, None] = None, **kwargs) → None[source]

Start worker instance for given app.

daemon = True
redirect_stdouts = True
worker_options = [<function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>]
options = [<function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>, <function option.<locals>.decorator>]
on_worker_created(worker: mode.worker.Worker) → None[source]
Return type:None
as_service(loop: asyncio.events.AbstractEventLoop, *args, **kwargs) → mode.types.services.ServiceT[source]
Return type:ServiceT[]
banner(worker: mode.worker.Worker) → str[source]

Generate the text banner emitted before the worker starts.

Return type:str
faust_ident() → str[source]
Return type:str
platform() → str[source]
Return type:str