Async Pipelines¶
pdum.plumbum.async_pipeline ¶
Attributes¶
Classes¶
AsyncPb ¶
AsyncPbPair ¶
Pb ¶
Bases: ABC
Abstract base class for plumbum pipe operations.
Pb defines the core interface for threading data through function calls using pipe operators. It provides a clear distinction between data and operators, allowing operators to be composed and assigned without execution.
The primary operators are:
- | (pipe): Combines operators into a pipeline (creates PbPair)
- > (thread): Threads data through the pipeline
Coercing an operator or pipeline into a plain callable can be done explicitly
via :meth:Pb.to_function:
pipeline = add_one | mul_two as_function = pipeline.to_function() as_function(10) 22
This form mirrors Pb.to_function but fits naturally into pipeline
expressions, enabling constructs like select((add_one | double).to_function())
to embed synchronous pipelines inside iterable operators.