Python SDK for Highway Workflow Engine. Build durable workflows with simple decorators.
pip install highwayfrom highway import Driver
driver = Driver() # Uses HIGHWAY_API_KEY env var
# Define tasks that will run in parallel
@driver.task(py=True)
def fetch_users():
return {"users": ["alice", "bob"], "count": 2}
@driver.task(py=True)
def fetch_orders():
return {"orders": [1, 2, 3], "count": 3}
# Group them for parallel execution
driver.parallel("fetch_data", branches=["fetch_users", "fetch_orders"])
# This waits for the parallel group to complete
@driver.task(shell=True, depends=["fetch_data"])
def notify():
return "echo 'All data fetched!'"
result = driver.run()
print(result.status) # "completed"- Shell, Python, HTTP tasks - Run commands, code, or API calls
- Task dependencies - Build DAGs with
depends=["task_name"] - Retries with backoff - Automatic retry on failure
- Durable delays - Sleep without consuming resources
- LLM tool integration - Build agentic workflows
- Scheduling - Cron or interval-based execution
- Task Types - Shell, Python, HTTP, Tool, Workflow
- Dependencies - Task DAGs and inputs
- Retries & Delays - Retry config, durable delays
- Scheduling - Cron and interval scheduling
- Observability - Status, cancel, idempotency
- Framework Integration - FastAPI, Flask
See examples/ for runnable examples:
simple_shell.py- Basic shell taskmulti_step.py- Task dependenciespython_func.py- Python code executionparallel.py- Parallel executionllm_agentic.py- LLM-powered workflowintegrations/- Flask/FastAPI integration
export HIGHWAY_API_KEY="your-key"
python examples/simple_shell.pyexport HIGHWAY_API_KEY="hw_k1_..."
export HIGHWAY_API_ENDPOINT="https://highway.solutions" # optionalOr pass directly:
driver = Driver(api_key="hw_k1_...", endpoint="https://highway.solutions")- Python 3.11+
- Highway API key (get one)
Apache 2.0
