Registry / workflow / pypiper

pypiper

JSON →
library0.5.3pypypi✓ verified 85d ago

Pypiper is a lightweight Python toolkit designed for building robust, restartable command-line pipelines. It simplifies the process of creating complex data processing workflows by handling logging, error recovery, and status tracking. The current version is 0.15.1, and it maintains an active release cadence with regular updates.

pip install pypiper
INSTALL
IMPORT
SIG · PYPIPER
P
pypiper
workflowpythonv0.5.3
Install
2.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pipeline
from pyPiper import Pipeline
from pypiper import PipelineManager
Node
from pyPiper import Node
NodeGraph
from pyPiper import NodeGraph

This quickstart demonstrates how to initialize a `PipelineManager`, define stages using `pm.run()` with shell commands, specify target files for restartability, and report a simple result. It creates an output directory, generates a file, processes it, and then reports a simple metric.

import pypiper import os # Define pipeline name and output directory PIPELINE_NAME = "my_pypiper_example" OUTDIR = "pypiper_output" os.makedirs(OUTDIR, exist_ok=True) # Initialize PipelineManager pm = pypiper.PipelineManager(name=PIPELINE_NAME, outdir=OUTDIR) print(f"\n--- Starting Pypiper Pipeline: {PIPELINE_NAME} ---") # Stage 1: Create an initial file input_file = os.path.join(OUTDIR, "raw_data.txt") cmd1 = f"echo 'Line 1\nLine 2\nLine 3' > {input_file}" pm.run(cmd1, target=input_file, stage_name="create_raw_data") # Stage 2: Process the file (e.g., count lines) output_file = os.path.join(OUTDIR, "processed_data.txt") cmd2 = f"wc -l {input_file} > {output_file}" pm.run(cmd2, target=output_file, stage_name="count_lines") # Report a result to pipestat (requires pipestat to be configured or just report to log) pm.report_result("lines_counted", os.path.getsize(output_file)) # Close the pipeline manager (flushes logs, finishes reporting) pm.close() print(f"--- Pipeline Finished! Check '{OUTDIR}' for results. ---") print(f"Content of {output_file}:") with open(output_file, 'r') as f: print(f.read().strip()) # Clean up (optional for quickstart demonstration) # import shutil # shutil.rmtree(OUTDIR)
pypiper --version
Debug
Known issues
breakingPypiper v0.14.0 dropped support for Python 2.7. Users on older Python versions will encounter `SyntaxError` or `ModuleNotFoundError`.
fix
Upgrade your Python environment to 3.10 or newer. Pypiper requires Python >=3.10.
affects: >=0.14.0
breakingSignificant changes to `pipestat` integration parameters occurred in v0.14.0 and v0.14.1. `pipestat_project_name` parameter was removed, `pipestat_sample_name` was renamed to `pipestat_record_identifier`, and `message_raw` type changed.
fix
Review your `PipelineManager` initialization and `report_result`/`report_object` calls. Update parameter names and ensure `message_raw` values conform to `pipestat`'s `value_dict` expectation.
affects: >=0.14.0
gotchaThe default value for `force_overwrite` in `PipelineManager` changed from `False` to `True` in v0.14.1. This means existing pipelines might unexpectedly rerun stages if not explicitly configured.
fix
If you rely on stages skipping when target files exist, explicitly set `force_overwrite=False` in your `PipelineManager` constructor or in individual `pm.run()` calls.
affects: >=0.14.1
gotchaPypiper relies on `target` files for restartability. If a stage's `target` file is not correctly created or updated by the command, Pypiper may incorrectly assume the stage failed or needs to be rerun, or conversely, skip a stage that should run.
fix
Ensure that the `target` file specified for `pm.run()` is indeed created or modified successfully by the executed command. Use `pypiper.check_file_existance(target)` or `pypiper.file_checksum(target)` in debugging.
affects: All
Upgrade
Version history
0.5.3latest on PyPI · released Feb 14, 2019
Audit
Dependencies
pipestatrequiredCore dependency for pipeline result reporting and status tracking; significant changes in integration from v0.14.0 onwards.
ubiquergrequiredProvides shared utilities for `pypiper` and related tools.
yacmanrequiredUsed for YAML-based configuration management.
Agent activity
32 hits · last 30 days
node
28
OpenAI (training)
1
Resources
pypiper — pip install pypiper · libregistry