pipeshell


Namepipeshell JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/filipecaixeta/pipeshell
SummaryA simple pipeline execution library
upload_time2025-01-17 16:37:02
maintainerNone
docs_urlNone
authorFilipe Caixeta
requires_python<4.0,>=3.8
licenseMIT
keywords pipeline shell ci
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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`:

```sh
pip install pipeshell
```

## Usage

Here's a quick example of how to define and run a pipeline with `pipeshell`:

```python
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.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/filipecaixeta/pipeshell",
    "name": "pipeshell",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "pipeline, shell, ci",
    "author": "Filipe Caixeta",
    "author_email": "filipecaixeta@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/41/e7/7ca0e8fc8b91b9abcfd0d0b4c8f9f7214bfe6974d0e61f8a15efcb8f93a5/pipeshell-0.9.0.tar.gz",
    "platform": null,
    "description": "# pipeshell\n\n**pipeshell** is a simple pipeline execution library allowing you to define and run pipelines of shell commands with dependencies, retries, and other features.\n\n## Features\n\n- Define steps with shell commands\n- Set dependencies between steps\n- Retry steps on failure\n- Run steps in the background\n- Capture and display step outputs\n- Set environment variables for steps\n\n## Installation\n\nTo install `pipeshell`, you can use `pip`:\n\n```sh\npip install pipeshell\n```\n\n## Usage\n\nHere's a quick example of how to define and run a pipeline with `pipeshell`:\n\n```python\nfrom pipeshell import pipeline, Step\n\n\n# Define the steps\nprepare_environment = Step(\n    name=\"prepare_environment\",\n    command=\"echo 'Preparing environment...'\"\n)\n\nfetch_data = Step(\n    name=\"fetch_data\",\n    command=\"curl -o data.txt https://example.com/data.txt\",\n    depends_on=[prepare_environment]\n)\n\nprocess_data = Step(\n    name=\"process_data\",\n    command=\"python process_data.py data.txt processed_data.txt\",\n    depends_on=[fetch_data]\n)\n\nanalyze_data = Step(\n    name=\"analyze_data\",\n    command=\"python analyze_data.py processed_data.txt results.txt\",\n    depends_on=[process_data]\n)\n\ncleanup = Step(\n    name=\"cleanup\",\n    command=\"rm data.txt processed_data.txt\",\n    depends_on=[analyze_data],\n    allow_failure=True  # Allow cleanup to fail without affecting pipeline\n)\n\npipeline(\"example_pipeline\", prepare_environment, fetch_data, process_data, analyze_data, cleanup)\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n## License\n\nThis project is licensed under the MIT License.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple pipeline execution library",
    "version": "0.9.0",
    "project_urls": {
        "Documentation": "https://github.com/filipecaixeta/pipeshell/wiki",
        "Homepage": "https://github.com/filipecaixeta/pipeshell",
        "Repository": "https://github.com/filipecaixeta/pipeshell"
    },
    "split_keywords": [
        "pipeline",
        " shell",
        " ci"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e82a084d15a3570173186a345300946138cf9c1a388af4f366ba7053810e3bba",
                "md5": "ced05ed4d4a842a470b801c58349ea05",
                "sha256": "c2e8a3a5491fa1f486a40b14a3afe6ac63b9724e97a32dd163916ebbd4b7e430"
            },
            "downloads": -1,
            "filename": "pipeshell-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ced05ed4d4a842a470b801c58349ea05",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 6977,
            "upload_time": "2025-01-17T16:37:00",
            "upload_time_iso_8601": "2025-01-17T16:37:00.840247Z",
            "url": "https://files.pythonhosted.org/packages/e8/2a/084d15a3570173186a345300946138cf9c1a388af4f366ba7053810e3bba/pipeshell-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41e77ca0e8fc8b91b9abcfd0d0b4c8f9f7214bfe6974d0e61f8a15efcb8f93a5",
                "md5": "9e07f40dc28017f9257636ecefc6eb1f",
                "sha256": "1243ff52abd7d982a58ee9b0eb223e8f8cf40867423fda117c6678a369f5b078"
            },
            "downloads": -1,
            "filename": "pipeshell-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9e07f40dc28017f9257636ecefc6eb1f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 6194,
            "upload_time": "2025-01-17T16:37:02",
            "upload_time_iso_8601": "2025-01-17T16:37:02.675020Z",
            "url": "https://files.pythonhosted.org/packages/41/e7/7ca0e8fc8b91b9abcfd0d0b4c8f9f7214bfe6974d0e61f8a15efcb8f93a5/pipeshell-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-17 16:37:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "filipecaixeta",
    "github_project": "pipeshell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pipeshell"
}
        
Elapsed time: 1.21432s