aboutcode.pipeline


Nameaboutcode.pipeline JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryAboutCode Pipeline library. Execute code in steps.
upload_time2024-11-21 09:37:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords open source pipeline scancode
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `aboutcode.pipeline`

Define and run pipelines.

### Install

```bash
pip install aboutcode.pipeline
```

### Define and execute a pipeline

```python
from aboutcode.pipeline import BasePipeline

class PrintMessages(BasePipeline):
    @classmethod
    def steps(cls):
        return (cls.step1,)

    def step1(self):
        print("Message from step1")

PrintMessages().execute()
```

### Options and steps selection

```python
from aboutcode.pipeline import BasePipeline
from aboutcode.pipeline import optional_step


class PrintMessages(BasePipeline):
    @classmethod
    def steps(cls):
        return (cls.step1, cls.step2)

    def step1(self):
        print("Message from step1")

    @optional_step("foo")
    def step2(self):
        print("Message from step2")


# Execute pipeline with group selection
run = PrintMessages(selected_groups=["foo"])
exitcode, error = run.execute()

# Execute pipeline with steps selection
run = PrintMessages(selected_steps=["step1"])
exitcode, error = run.execute()
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aboutcode.pipeline",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "open source, pipeline, scancode",
    "author": null,
    "author_email": "\"nexB. Inc. and others\" <info@aboutcode.org>",
    "download_url": "https://files.pythonhosted.org/packages/ae/15/af19ecaec26067b576be8867b6eb298f39125404437ffabd872711565a50/aboutcode_pipeline-0.2.0.tar.gz",
    "platform": null,
    "description": "# `aboutcode.pipeline`\n\nDefine and run pipelines.\n\n### Install\n\n```bash\npip install aboutcode.pipeline\n```\n\n### Define and execute a pipeline\n\n```python\nfrom aboutcode.pipeline import BasePipeline\n\nclass PrintMessages(BasePipeline):\n    @classmethod\n    def steps(cls):\n        return (cls.step1,)\n\n    def step1(self):\n        print(\"Message from step1\")\n\nPrintMessages().execute()\n```\n\n### Options and steps selection\n\n```python\nfrom aboutcode.pipeline import BasePipeline\nfrom aboutcode.pipeline import optional_step\n\n\nclass PrintMessages(BasePipeline):\n    @classmethod\n    def steps(cls):\n        return (cls.step1, cls.step2)\n\n    def step1(self):\n        print(\"Message from step1\")\n\n    @optional_step(\"foo\")\n    def step2(self):\n        print(\"Message from step2\")\n\n\n# Execute pipeline with group selection\nrun = PrintMessages(selected_groups=[\"foo\"])\nexitcode, error = run.execute()\n\n# Execute pipeline with steps selection\nrun = PrintMessages(selected_steps=[\"step1\"])\nexitcode, error = run.execute()\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "AboutCode Pipeline library. Execute code in steps.",
    "version": "0.2.0",
    "project_urls": {
        "Changelog": "https://github.com/aboutcode-org/scancode.io/tree/main/aboutcode/pipeline/CHANGELOG.md",
        "Documentation": "https://scancodeio.readthedocs.io/",
        "Homepage": "https://github.com/aboutcode-org/scancode.io",
        "Issues": "https://github.com/aboutcode-org/scancode.io/issues",
        "Repository": "https://github.com/aboutcode-org/scancode.io/tree/main/aboutcode/pipeline"
    },
    "split_keywords": [
        "open source",
        " pipeline",
        " scancode"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "096daf0f08f4fc77af36905cbde873044d365d1d16e9cb7ea5f7486c9685a94f",
                "md5": "8dc325fd6b8719b96e6ffb7fb2b369e8",
                "sha256": "d5b4bd12af308163eeb815686e7bba45ac9486f9d64a85cd1836f01d581fe6d1"
            },
            "downloads": -1,
            "filename": "aboutcode_pipeline-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8dc325fd6b8719b96e6ffb7fb2b369e8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 11417,
            "upload_time": "2024-11-21T09:37:51",
            "upload_time_iso_8601": "2024-11-21T09:37:51.909363Z",
            "url": "https://files.pythonhosted.org/packages/09/6d/af0f08f4fc77af36905cbde873044d365d1d16e9cb7ea5f7486c9685a94f/aboutcode_pipeline-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ae15af19ecaec26067b576be8867b6eb298f39125404437ffabd872711565a50",
                "md5": "d2a228413f9abd0b580ea6a0623ab411",
                "sha256": "d4da24e20473b361a3a855a4945f256c40e05dbe631ec3bd26bd7b0c83e6c815"
            },
            "downloads": -1,
            "filename": "aboutcode_pipeline-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d2a228413f9abd0b580ea6a0623ab411",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 8819,
            "upload_time": "2024-11-21T09:37:53",
            "upload_time_iso_8601": "2024-11-21T09:37:53.472049Z",
            "url": "https://files.pythonhosted.org/packages/ae/15/af19ecaec26067b576be8867b6eb298f39125404437ffabd872711565a50/aboutcode_pipeline-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-21 09:37:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aboutcode-org",
    "github_project": "scancode.io",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aboutcode.pipeline"
}
        
Elapsed time: 0.38552s