pipekit-sdk


Namepipekit-sdk JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://pipekit.io
SummaryPipekit Python SDK
upload_time2024-09-11 09:40:07
maintainerNone
docs_urlNone
authorPipekit
requires_python<4,>=3.8
licenseBSD-3-Clause
keywords pipekit hera argo workflows orchestration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Pipekit Logo](https://helm.pipekit.io/assets/pipekit-logo.png)](https://pipekit.io)

[Pipekit](https://pipekit.io) allows you to manage your workflows at scale. The control plane configures Argo Workflows for you in your infrastructure, enabling you to optimize multi-cluster workloads while reducing your cloud spend.  The team at Pipekit is also happy to support you through your Argo Workflows journey via commercial support.

# Pipekit Python SDK

## Installation

```bash
pip install pipekit-sdk
```

## Usage

```python
from hera.workflows import (
    DAG,
    Parameter,
    Script,
    Workflow,
)

from pipekit_sdk.service import PipekitService

# Create a Pipekit service that is used to talk to the Pipekit API
pipekit = PipekitService(token="<Bearer Token>")

# List clusters and Pipes
clusters = pipekit.list_clusters()
pipes = pipekit.list_pipes()

# Create a Workflow and submit it to Pipekit.
# Hera's dag-diamond example
def my_print_script(message):
    print(message)

def get_script(callable):
    # Note that we have the _option_ to set `inputs=Parameter(name="message")`, but
    # Hera infers the Parameters that are necessary based on the passed-in callable.
    return Script(
        name=callable.__name__.replace("_", "-"),
        source=callable,
        add_cwd_to_sys_path=False,
        image="python:alpine3.6",
    )

with Workflow(
    generate_name="dag-diamond-",
    entrypoint="diamond",
    namespace="default",
) as w:
    echo = get_script(my_print_script)

    with DAG(name="diamond"):
        A = echo(name="A", arguments=[Parameter(name="message", value="A")])
        B = echo(name="B", arguments=[Parameter(name="message", value="B")])
        C = echo(name="C", arguments=[Parameter(name="message", value="C")])
        D = echo(name="D", arguments=[Parameter(name="message", value="D")])
        A >> [B, C] >> D

# Submit the Workflow to Pipekit
pipe_run = pipekit.submit(w, "<cluster-name>")

# Tail the logs
pipekit.print_logs(pipe_run["uuid"])
```

## Further help
Please refer to the [Pipekit Documentation](https://docs.pipekit.io) for more information.


            

Raw data

            {
    "_id": null,
    "home_page": "https://pipekit.io",
    "name": "pipekit-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "pipekit, hera, argo, workflows, orchestration",
    "author": "Pipekit",
    "author_email": "ci@pipekit.io",
    "download_url": "https://files.pythonhosted.org/packages/8f/b6/a1f9842adabb417d50747ab8337d5fbba780c96908c97ebc90a3a95581f7/pipekit_sdk-1.1.0.tar.gz",
    "platform": null,
    "description": "[![Pipekit Logo](https://helm.pipekit.io/assets/pipekit-logo.png)](https://pipekit.io)\n\n[Pipekit](https://pipekit.io) allows you to manage your workflows at scale. The control plane configures Argo Workflows for you in your infrastructure, enabling you to optimize multi-cluster workloads while reducing your cloud spend.  The team at Pipekit is also happy to support you through your Argo Workflows journey via commercial support.\n\n# Pipekit Python SDK\n\n## Installation\n\n```bash\npip install pipekit-sdk\n```\n\n## Usage\n\n```python\nfrom hera.workflows import (\n    DAG,\n    Parameter,\n    Script,\n    Workflow,\n)\n\nfrom pipekit_sdk.service import PipekitService\n\n# Create a Pipekit service that is used to talk to the Pipekit API\npipekit = PipekitService(token=\"<Bearer Token>\")\n\n# List clusters and Pipes\nclusters = pipekit.list_clusters()\npipes = pipekit.list_pipes()\n\n# Create a Workflow and submit it to Pipekit.\n# Hera's dag-diamond example\ndef my_print_script(message):\n    print(message)\n\ndef get_script(callable):\n    # Note that we have the _option_ to set `inputs=Parameter(name=\"message\")`, but\n    # Hera infers the Parameters that are necessary based on the passed-in callable.\n    return Script(\n        name=callable.__name__.replace(\"_\", \"-\"),\n        source=callable,\n        add_cwd_to_sys_path=False,\n        image=\"python:alpine3.6\",\n    )\n\nwith Workflow(\n    generate_name=\"dag-diamond-\",\n    entrypoint=\"diamond\",\n    namespace=\"default\",\n) as w:\n    echo = get_script(my_print_script)\n\n    with DAG(name=\"diamond\"):\n        A = echo(name=\"A\", arguments=[Parameter(name=\"message\", value=\"A\")])\n        B = echo(name=\"B\", arguments=[Parameter(name=\"message\", value=\"B\")])\n        C = echo(name=\"C\", arguments=[Parameter(name=\"message\", value=\"C\")])\n        D = echo(name=\"D\", arguments=[Parameter(name=\"message\", value=\"D\")])\n        A >> [B, C] >> D\n\n# Submit the Workflow to Pipekit\npipe_run = pipekit.submit(w, \"<cluster-name>\")\n\n# Tail the logs\npipekit.print_logs(pipe_run[\"uuid\"])\n```\n\n## Further help\nPlease refer to the [Pipekit Documentation](https://docs.pipekit.io) for more information.\n\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Pipekit Python SDK",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://docs.pipekit.io/",
        "Homepage": "https://pipekit.io"
    },
    "split_keywords": [
        "pipekit",
        " hera",
        " argo",
        " workflows",
        " orchestration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "51a50429756cf15749d4395feb5668c8503150bc930d188f2738374234c273df",
                "md5": "1a29f26a56b1896ea431823e0cca53e1",
                "sha256": "4f33bb594d2a9bf762f18fbc9e2af8c1c934e16b67a10c054ac2620e1719229c"
            },
            "downloads": -1,
            "filename": "pipekit_sdk-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1a29f26a56b1896ea431823e0cca53e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 6411,
            "upload_time": "2024-09-11T09:40:07",
            "upload_time_iso_8601": "2024-09-11T09:40:07.069474Z",
            "url": "https://files.pythonhosted.org/packages/51/a5/0429756cf15749d4395feb5668c8503150bc930d188f2738374234c273df/pipekit_sdk-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8fb6a1f9842adabb417d50747ab8337d5fbba780c96908c97ebc90a3a95581f7",
                "md5": "101ace09535199095c05be53afefd90b",
                "sha256": "2be9542389bb4733be750a8708296f69b0993fc50c58454d306c87d82671ef98"
            },
            "downloads": -1,
            "filename": "pipekit_sdk-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "101ace09535199095c05be53afefd90b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 5895,
            "upload_time": "2024-09-11T09:40:07",
            "upload_time_iso_8601": "2024-09-11T09:40:07.852350Z",
            "url": "https://files.pythonhosted.org/packages/8f/b6/a1f9842adabb417d50747ab8337d5fbba780c96908c97ebc90a3a95581f7/pipekit_sdk-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-11 09:40:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pipekit-sdk"
}
        
Elapsed time: 0.63390s