pipeshell


Namepipeshell JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/filipecaixeta/pipeshell
SummaryA simple pipeline execution library
upload_time2024-06-17 03:47:49
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/55/09/5981d1ac168cf39e729b5cfb7d27fb89f1b5e5f5758215c44ca02371c14f/pipeshell-0.3.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.3.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": "145c6430459c43539b8e73298e52739786fdb68a5b1e8a79d2ec2cdbb25ef769",
                "md5": "fafef92515e31427f9859087ba743cf1",
                "sha256": "476202d58566b7b1d779df5b1db288c051d77a8d70348db29f5d122f8722c9f9"
            },
            "downloads": -1,
            "filename": "pipeshell-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fafef92515e31427f9859087ba743cf1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 6632,
            "upload_time": "2024-06-17T03:47:48",
            "upload_time_iso_8601": "2024-06-17T03:47:48.631419Z",
            "url": "https://files.pythonhosted.org/packages/14/5c/6430459c43539b8e73298e52739786fdb68a5b1e8a79d2ec2cdbb25ef769/pipeshell-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55095981d1ac168cf39e729b5cfb7d27fb89f1b5e5f5758215c44ca02371c14f",
                "md5": "0898d69d1562c39fa4d1b89583f98bc5",
                "sha256": "af182bbda823767079d0975d4599ca2dff702ebf3617d5508ed63a1fe466a160"
            },
            "downloads": -1,
            "filename": "pipeshell-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0898d69d1562c39fa4d1b89583f98bc5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 5878,
            "upload_time": "2024-06-17T03:47:49",
            "upload_time_iso_8601": "2024-06-17T03:47:49.827622Z",
            "url": "https://files.pythonhosted.org/packages/55/09/5981d1ac168cf39e729b5cfb7d27fb89f1b5e5f5758215c44ca02371c14f/pipeshell-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-17 03:47:49",
    "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: 0.32817s