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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stepflow_py-0.10.0.tar.gz.
File metadata
- Download URL: stepflow_py-0.10.0.tar.gz
- Upload date:
- Size: 134.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
208a8c018d374effd9c0ce6bf6f421761792bff0f18598d49e5733b77c6167d3
|
|
| MD5 |
63309549523e7fdaec8f20e59ef9dc17
|
|
| BLAKE2b-256 |
672be8d1c191b4240551fb2fbeb3b571b77f290c47c677b82dde01f76ef53355
|
Provenance
The following attestation bundles were made for stepflow_py-0.10.0.tar.gz:
Publisher:
release_python.yml on stepflow-ai/stepflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stepflow_py-0.10.0.tar.gz -
Subject digest:
208a8c018d374effd9c0ce6bf6f421761792bff0f18598d49e5733b77c6167d3 - Sigstore transparency entry: 984633807
- Sigstore integration time:
-
Permalink:
stepflow-ai/stepflow@1ded27373d0b755307f6e19a6e592ae3540053fd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stepflow-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_python.yml@1ded27373d0b755307f6e19a6e592ae3540053fd -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file stepflow_py-0.10.0-py3-none-any.whl.
File metadata
- Download URL: stepflow_py-0.10.0-py3-none-any.whl
- Upload date:
- Size: 193.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
031935a229b333b580c72756399a67cc14723a6d494f4be754287f0c49f166d3
|
|
| MD5 |
dc20ade44b6c7750f36fc63b750dd09a
|
|
| BLAKE2b-256 |
9ab44562021d72e822aa3979456e325a993726ee6461dcda71d5ce35c91798a4
|
Provenance
The following attestation bundles were made for stepflow_py-0.10.0-py3-none-any.whl:
Publisher:
release_python.yml on stepflow-ai/stepflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stepflow_py-0.10.0-py3-none-any.whl -
Subject digest:
031935a229b333b580c72756399a67cc14723a6d494f4be754287f0c49f166d3 - Sigstore transparency entry: 984633814
- Sigstore integration time:
-
Permalink:
stepflow-ai/stepflow@1ded27373d0b755307f6e19a6e592ae3540053fd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stepflow-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_python.yml@1ded27373d0b755307f6e19a6e592ae3540053fd -
Trigger Event:
workflow_dispatch
-
Statement type: