A simple pipeline execution library
Project description
pipeshell
pipeshell is a simple pipeline execution library allowing you to define and run pipelines of shell commands with dependencies, retries, and other features.
Features
- Define steps with shell commands
- Set dependencies between steps
- Retry steps on failure
- Run steps in the background
- Capture and display step outputs
- Set environment variables for steps
Installation
To install pipeshell, you can use pip:
pip install pipeshell
Usage
Here's a quick example of how to define and run a pipeline with pipeshell:
from pipeshell import pipeline, Step
# Define the steps
prepare_environment = Step(
name="prepare_environment",
command="echo 'Preparing environment...'"
)
fetch_data = Step(
name="fetch_data",
command="curl -o data.txt https://example.com/data.txt",
depends_on=[prepare_environment]
)
process_data = Step(
name="process_data",
command="python process_data.py data.txt processed_data.txt",
depends_on=[fetch_data]
)
analyze_data = Step(
name="analyze_data",
command="python analyze_data.py processed_data.txt results.txt",
depends_on=[process_data]
)
cleanup = Step(
name="cleanup",
command="rm data.txt processed_data.txt",
depends_on=[analyze_data],
allow_failure=True # Allow cleanup to fail without affecting pipeline
)
pipeline("example_pipeline", prepare_environment, fetch_data, process_data, analyze_data, cleanup)
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipeshell-0.9.0.tar.gz.
File metadata
- Download URL: pipeshell-0.9.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1243ff52abd7d982a58ee9b0eb223e8f8cf40867423fda117c6678a369f5b078
|
|
| MD5 |
9e07f40dc28017f9257636ecefc6eb1f
|
|
| BLAKE2b-256 |
41e77ca0e8fc8b91b9abcfd0d0b4c8f9f7214bfe6974d0e61f8a15efcb8f93a5
|
Provenance
The following attestation bundles were made for pipeshell-0.9.0.tar.gz:
Publisher:
python-publish.yml on filipecaixeta/pipeshell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipeshell-0.9.0.tar.gz -
Subject digest:
1243ff52abd7d982a58ee9b0eb223e8f8cf40867423fda117c6678a369f5b078 - Sigstore transparency entry: 163240343
- Sigstore integration time:
-
Permalink:
filipecaixeta/pipeshell@ccea5d489bf192b612eca03f36f2908fe15eb629 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/filipecaixeta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ccea5d489bf192b612eca03f36f2908fe15eb629 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pipeshell-0.9.0-py3-none-any.whl.
File metadata
- Download URL: pipeshell-0.9.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2e8a3a5491fa1f486a40b14a3afe6ac63b9724e97a32dd163916ebbd4b7e430
|
|
| MD5 |
ced05ed4d4a842a470b801c58349ea05
|
|
| BLAKE2b-256 |
e82a084d15a3570173186a345300946138cf9c1a388af4f366ba7053810e3bba
|
Provenance
The following attestation bundles were made for pipeshell-0.9.0-py3-none-any.whl:
Publisher:
python-publish.yml on filipecaixeta/pipeshell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipeshell-0.9.0-py3-none-any.whl -
Subject digest:
c2e8a3a5491fa1f486a40b14a3afe6ac63b9724e97a32dd163916ebbd4b7e430 - Sigstore transparency entry: 163240346
- Sigstore integration time:
-
Permalink:
filipecaixeta/pipeshell@ccea5d489bf192b612eca03f36f2908fe15eb629 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/filipecaixeta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ccea5d489bf192b612eca03f36f2908fe15eb629 -
Trigger Event:
push
-
Statement type: