Skip to main content

Python SDK for Stepflow - includes API client and component server (worker) functionality.

Project description

stepflow-py

The official Python SDK for Stepflow - an orchestration engine for AI workflows.

Installation

pip install stepflow-py

Features

  • API Client: Type-safe client for the Stepflow REST API
  • Worker Module: Build component servers that extend Stepflow functionality
  • Flow Builder: Programmatically create and manipulate workflows

Quick Start

Using the API Client

from stepflow_py.api import ApiClient, Configuration, FlowApi

config = Configuration(host="http://localhost:8080")
client = ApiClient(configuration=config)
flow_api = FlowApi(client)

# Submit a workflow
response = flow_api.submit_flow(flow_definition)

Building a Worker (Component Server)

from stepflow_py.worker import StepflowServer, StepflowContext
import msgspec

class MyInput(msgspec.Struct):
    message: str

class MyOutput(msgspec.Struct):
    result: str

server = StepflowServer()

@server.component
async def my_component(input: MyInput, context: StepflowContext) -> MyOutput:
    return MyOutput(result=f"Processed: {input.message}")

if __name__ == "__main__":
    import asyncio
    asyncio.run(server.run())

Documentation

For full documentation, visit stepflow.org.

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stepflow_py-0.11.2.tar.gz (135.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stepflow_py-0.11.2-py3-none-any.whl (183.4 kB view details)

Uploaded Python 3

File details

Details for the file stepflow_py-0.11.2.tar.gz.

File metadata

  • Download URL: stepflow_py-0.11.2.tar.gz
  • Upload date:
  • Size: 135.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stepflow_py-0.11.2.tar.gz
Algorithm Hash digest
SHA256 46d2f5356cd2067d3e5df930dfb2aa9e3e914c68edb5b9421c1f9585b65a8ef1
MD5 117036afc86ce5de0c364cf7c1bd050a
BLAKE2b-256 43e9e76c4f13a3b569805bf4a6f713911245aaae37d07afa05a3349a932b041c

See more details on using hashes here.

Provenance

The following attestation bundles were made for stepflow_py-0.11.2.tar.gz:

Publisher: release_python.yml on stepflow-ai/stepflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stepflow_py-0.11.2-py3-none-any.whl.

File metadata

  • Download URL: stepflow_py-0.11.2-py3-none-any.whl
  • Upload date:
  • Size: 183.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stepflow_py-0.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 71ff55fc840b94d29a42f83179d58d1ea22bb23f92f440256ad8089fdf9b7a6a
MD5 333d25b2db5d435331f3592753bb75ef
BLAKE2b-256 e65f6865e86eb23313596d7380a6b2d4679b0e79ec5a0da4fca788bce99ca859

See more details on using hashes here.

Provenance

The following attestation bundles were made for stepflow_py-0.11.2-py3-none-any.whl:

Publisher: release_python.yml on stepflow-ai/stepflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page