For the complete documentation index, see llms.txt. This page is also available as Markdown.

Python SDK

Using the Pipekit Python SDK

The Pipekit Python SDK lets you talk to the Pipekit API from Python. It's the right surface for use in Jupyter Notebooks, inside Python scripts, and for building automation against Pipekit programmatically.

The SDK wraps the REST API and is designed to pair well with Hera for authoring workflows in Python.

Install

pip install pipekit-sdk

The SDK targets Python 3.10+.

Authenticate

The SDK uses a bearer token, which you generate with the Pipekit CLI:

pipekit login          # one-time, opens browser for SSO or prompts for password
pipekit hera           # prints a token to stdout

Pass the token to a PipekitService:

from pipekit_sdk.service import PipekitService

pipekit = PipekitService(token="<token>")

For longer-lived programs, set PIPEKIT_TOKEN and pull it from the environment:

import os
from pipekit_sdk.service import PipekitService

pipekit = PipekitService(token=os.environ["PIPEKIT_TOKEN"])

Submit a Workflow

submit returns the pipe_run dictionary including the Run's UUID.

List Runs

Filter by Pipe, namespace, or status. See the SDK source for the full parameter list.

Stop, terminate, or restart a Run

stop runs exit handlers; terminate does not. restart resubmits with the same parameters and returns a new pipe_run.

Stream logs

For non-blocking access, use the lower-level log fetcher (see SDK source).

CronWorkflows

The SDK supports the full CronWorkflow lifecycle:

What's next

Last updated