tethys.core.pipes.pipe_base
¶
Module Contents¶
-
class
tethys.core.pipes.pipe_base.
PipeBase
[source]¶ Bases:
tethys.core.regobjs.regobj_base.RegistrableObjectBase
Base abstract class for the Pipes
-
abstract
get_stream
(self, session: SessionBase) → 'StreamBase'[source]¶ Get or create stream
- Parameters
session (SessionBase) – Session instance
- Returns
Stream instance
- Return type
-
abstract
pull
(self, session: SessionBase, **kwargs) → Generator[source]¶ Get data_packets from the pipe’s stream using python Generator
- Parameters
session (SessionBase) – Session instance
- Returns
data_packets generator
- Return type
-
abstract
push
(self, data_packet: Any, session: SessionBase, **kwargs)[source]¶ Push data to the pipe’s stream
- Parameters
data_packet – any data object or list of the data objects (with many=True)
session (ZeroSession) – ZeroSession instance
-
abstract