methodflow package

Submodules

methodflow.pipeline module

class methodflow.pipeline.PipelineMixin[source]

Bases: object

Decorator and methods for building a processing pipeline.

class StepSkipped[source]

Bases: object

execute_pipeline(*args, **kwargs) Any[source]

Execute the pipeline.

The arguments are passed to the starting preprocess steps.

static op(condition: str | None = '') Callable[[Callable], ProcessStep][source]

Decorator for registering a preprocess method.

This needs to be the top-most decorator if using stacked decorators (e.g. @classmethod, @staticmethod).

Parameters:

condition (str) – Comma separated string of attribute names used as predicates for the annotated method. The method will run if all the predicates are True at runtime.

class methodflow.pipeline.ProcessStep(process_func: Callable, condition_attrs: list[str] = None)[source]

Bases: object

Wrapper of Callable, with info to build the pipeline.

property condition_attrs: list[str]
property func: Callable
property func_arg_names: list[str]
property in_degree: int
property out_degree: int
property out_to_run_degree: int
reset()[source]

Module contents