pypz.plugins.kafka_io.ports module

class pypz.plugins.kafka_io.ports.KafkaChannelInputPort(name: str = None, *args, **kwargs)

Bases: ChannelInputPort

_abc_impl = <_abc._abc_data object>
_channel_reader: ChannelReader | None

The only channel reader maintained by this plugin.

_delete_resources: bool

This flag signalizes, if resource deletion can be performed. It will be cleared, if there is an error on OperationRunning state to allow process restart.

_expected_output_count: int | None

During _on_port_open the expected number of connected outputs will be calculated. It then will be used in cases, where we need to wait for all outputs.

_interrupted: bool

Helper flag to register, if the execution has been interrupted.

_need_to_check_connections_opened: bool

Helper flag to signalize, if the channel shall be opened. This is necessary to maintain state in _on_port_open().

channel_reader_type: Type[ChannelReader]

Type of the channel reader to be created by this plugin.

class pypz.plugins.kafka_io.ports.KafkaChannelOutputPort(name: str = None, *args, **kwargs)

Bases: ChannelOutputPort

_abc_impl = <_abc._abc_data object>
_channel_writers: set[ChannelWriter] | None

The channel writers to be maintained by this plugin. Note that a channel writer will be created for each connection from this output port plugin.

_delete_resources: bool

This flag signalizes, if resource deletion can be performed. It will be cleared, if there is an error on OperationRunning state to allow process restart.

_interrupted: bool

Helper flag to register, if the execution has been interrupted.

_port_close_errors: set[ChannelWriter]

Set to store the channels that had errors on port closure. It is necessary to be able not to reschedule those channels in re-execution of the state.

_resource_deletion_errors: set[ChannelWriter]

Set to store the channels that had errors on resource deletion. It is necessary to be able not to reschedule those channels in re-execution of the state.

channel_writer_type: Type[ChannelWriter]

Type of the channel writer to be created by this plugin.