Skip to main content

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

pipeshell-0.8.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipeshell-0.8.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pipeshell-0.8.0.tar.gz.

File metadata

  • Download URL: pipeshell-0.8.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pipeshell-0.8.0.tar.gz
Algorithm Hash digest
SHA256 fa98919e89dc6a74dd49a5eeb170a976b8b9cc8bf0f05c89a18e7899904e225e
MD5 13ee9bca97f41a5a499ab03519230fec
BLAKE2b-256 88836412b6f637cec14aa81f9cc951de6a531ee09e1b553a2e5318015b7a8d60

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipeshell-0.8.0.tar.gz:

Publisher: python-publish.yml on filipecaixeta/pipeshell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pipeshell-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: pipeshell-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pipeshell-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34a8058bac2de1367ae28d7a6bc3d4ec0b5eba03aa8513c339549e130e5564c6
MD5 2d076af3c19a50a2e347666d3aefb8e0
BLAKE2b-256 af64c19252bd698aa975dbb67d3a12a1dd3642a584670e42a154c80ed287bf85

See more details on using hashes here.

Provenance

The following attestation bundles were made for pipeshell-0.8.0-py3-none-any.whl:

Publisher: python-publish.yml on filipecaixeta/pipeshell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page