API Reference

Generated from the docstrings in src/pipef/pipef.py

class pipef.pipef.pipef(*args: Any, **kwargs: Any)[source]

Chains callables with |; calling pipef(…), even with no arguments, pipes eagerly Only the bare class, never called, opens a lazy reusable chain — see USAGE.md for both modes

__call__(*args: Any, **kwargs: Any) Any[source]

Runs the lazy chain against args/kwargs, or with none, returns an eager result directly

__hash__ = None

Frozen dataclasses hash by field value by default, but kwargs is a dict, so hashing would always blow up anyway — disable it outright rather than let that leak through as a surprise

__init__(*args: Any, **kwargs: Any) None[source]

Any direct call is eager, holding args/kwargs as the value to pipe through

__iter__() Iterator[Any][source]

Yields the held value, so an eager result can be unpacked with result, =

__or__(func: Callable[[...], Any]) pipef[source]

Applies func now if eager, otherwise appends it to the lazy chain; both return a fresh pipef

__repr__() str[source]

Shows the held value once eager, so a bare pipef() reads as None, not a raw dataclass repr

args: tuple[Any, ...]

Positional arguments held by an eager pipef, or empty for a lazy chain

eager: bool

True when this pipef holds a value to pipe eagerly, False for a lazy | chain

func_list: tuple[Callable[[...], Any], ...]

The lazy chain’s functions in application order, or empty while eager

kwargs: dict[str, Any]

Keyword arguments held by an eager pipef, or empty for a lazy chain

class pipef.pipef._PipefMeta[source]

Lets a lazy chain start on the bare class, so pipef | func opens one without a call

__or__(func: Callable[[...], Any]) pipef[source]

Opens a lazy chain of cls and pipes func into it as the first step