Zum Inhalt

Overview

package wittgenstein_pipelines

Wittgenstein Pipelines Library.

Provides models and execution runners for sequential pipelines and workflows.

Classes

  • PipelineStep — A single step defined in a pipeline or workflow chain.

  • PipelineContext — Context state passed and mutated across workflow execution steps.

  • StepStatus

  • PipelineRunner — Orchestrates sequential and conditional execution of registered pipeline/workflow steps.

wittgenstein_pipelines.PipelineStep

mkapi_definition_mkapi class PipelineStep()

Bases : BaseModel

A single step defined in a pipeline or workflow chain.

wittgenstein_pipelines.PipelineContext

mkapi_definition_mkapi class PipelineContext()

Bases : BaseModel

Context state passed and mutated across workflow execution steps.

wittgenstein_pipelines.StepStatus

mkapi_definition_mkapi class StepStatus()

Bases : str, Enum

wittgenstein_pipelines.PipelineRunner

mkapi_definition_mkapi class PipelineRunner(steps: List[PipelineStep])

Orchestrates sequential and conditional execution of registered pipeline/workflow steps.

Methods

  • register_step_executor — Register the executable function for a given step ID.

  • run — Run all steps sequentially respecting dependencies.

wittgenstein_pipelines.PipelineRunner.register_step_executor

mkapi_definition_mkapi method PipelineRunner.register_step_executor(step_id: str, fn: Callable[[PipelineContext], Any]) → None

Register the executable function for a given step ID.

Raises

  • ValueError

wittgenstein_pipelines.PipelineRunner.run

mkapi_definition_mkapi async method PipelineRunner.run(self, context: PipelineContext) → PipelineContext

Run all steps sequentially respecting dependencies.

Raises

  • RuntimeError