faust.cli.send
¶
Program faust send
used to send events to agents and topics.
- class faust.cli.send.send(ctx: Context, *args: Any, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, **kwargs: Any)[source]¶
Send message to agent/topic.
- key_serializer: Optional[Union[CodecT, str]]¶
The codec used to serialize keys. Taken from instance parameters or
key_serializer
.
- options: Optional[OptionList] = [option('--key-type', '-K', help='Name of model to serialize key into.'), option('--key-serializer', help='Override default serializer for key.'), option('--value-type', '-V', help='Name of model to serialize value into.'), option('--value-serializer', help='Override default serializer for value.'), option('--key', '-k', help='String value for key (use json if model).'), option('--partition', type=<class 'int'>, help='Specific partition to send to.'), option('--repeat', '-r', type=<class 'int'>, default=1, help='Send message n times.'), option('--min-latency', type=<class 'float'>, default=0.0, help='Minimum delay between sending.'), option('--max-latency', type=<class 'float'>, default=0.0, help='Maximum delay between sending.'), argument('entity'), argument('value', default=None, required=False)]¶
- async run(entity: str, value: str, *args: Any, key: Optional[str] = None, key_type: Optional[str] = None, key_serializer: Optional[str] = None, value_type: Optional[str] = None, value_serializer: Optional[str] = None, partition: int = 1, timestamp: Optional[float] = None, repeat: int = 1, min_latency: float = 0.0, max_latency: float = 0.0, **kwargs: Any) Any [source]¶
Send message to topic/agent/channel.
- Return type:
- value_serialier: CodecArg¶
The codec used to serialize values. Taken from instance parameters or
value_serializer
.
- stdout: IO¶
- stderr: IO¶
- args: Tuple¶