pyper.Pipeline
Pipeline
def __new__(cls, tasks: List[Task]) -> Pipeline:
An object that represents a data flow consisting of a series of (at least one) tasks.
It is not recommended to instantiate a Pipeline
directly. Use the task class
Pipeline.__call__
def __call__(self, *args, **kwargs) -> Generator[Any, None, None]:
A Pipeline
is a callable object with the parameter specification of its first task which generates each output from its last task.
Pipeline.pipe
def pipe(self, other: Pipeline) -> Pipeline:
Allows two Pipeline
objects to be composed together, returning a new pipeline with a combined list of tasks.
Pipeline.__or__
def __or__(self, other: Pipeline) -> Pipeline:
Allows the use of the operator |
as syntactic sugar for Pipeline.pipe
.
Pipeline.consume
def consume(self, other: Callable) -> Callable:
Allows a consumer function to be attached to a Pipeline
.
Pipeline.__gt__
def __gt__(self, other: Callable) -> Callable:
Allows the use of the operator >
as syntactic sugar for Pipeline.consume
.