Python framework for authoring Cadence workflows and activities
Project description
Python framework for Cadence
Cadence is a distributed, scalable, durable, and highly available orchestration engine we developed at Uber Engineering to execute asynchronous long-running business logic in a scalable and resilient way.
If you'd like to propose a new feature, first join the CNCF Slack workspace in the #cadence-users channel to start a discussion.
cadence-python-client is the Python framework for authoring workflows and activities.
Disclaimer
This SDK is currently an early work-in-progress (WIP) and is NOT ready for production use.
- This project is still in active development
- It has not been published to any package repository (PyPI, etc.)
- APIs and interfaces are subject to change without notice
Installation
git clone https://github.com/cadence-workflow/cadence-python-client.git
cd cadence-python-client
Development
Setup
-
Install protobuf (required):
# macOS brew install protobuf@29 # Linux/Other # Install protobuf 29.x via your package manager
-
Install uv (recommended):
# macOS brew install uv # Linux/Other curl -LsSf https://astral.sh/uv/install.sh | sh source $HOME/.local/bin/env # Add to your shell profile for persistence
-
Create virtual environment and install dependencies:
uv venv uv pip install -e ".[dev]"
Or if you prefer traditional pip:
python3.11 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -e ".[dev]"
Generate Protobuf and gRPC Files
Run the generation script:
# Using uv (recommended)
uv sync --extra dev
uv run python scripts/generate_proto.py
# Or using traditional Python
python scripts/generate_proto.py
This will:
- Download protoc 29.1 binary
- Install grpcio-tools if needed
- Generate Python protobuf files in
cadence/api/v1/ - Generate gRPC service files in
cadence/api/v1/ - Create proper package structure with both protobuf and gRPC imports
Test
Verify the generated files work:
# Using uv (recommended)
uv run python cadence/sample/simple_usage_example.py
uv run python cadence/sample/grpc_usage_example.py
# Or using traditional Python
python cadence/sample/simple_usage_example.py
python test_grpc_with_examples.py
Development Script
The project includes a development script that provides convenient commands for common tasks:
# Generate protobuf files
uv run python scripts/dev.py protobuf
# Run tests
uv run python scripts/dev.py test
# Run tests with coverage
uv run python scripts/dev.py test-cov
# Run linting
uv run python scripts/dev.py lint
# Format code
uv run python scripts/dev.py format
# Install in development mode
uv run python scripts/dev.py install
# Install with dev dependencies
uv run python scripts/dev.py install-dev
# Build package
uv run python scripts/dev.py build
# Clean build artifacts
uv run python scripts/dev.py clean
# Run all checks (lint + test)
uv run python scripts/dev.py check
License
Apache 2.0 License, please see LICENSE for details.
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
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 cadence_python_client-0.2.1.tar.gz.
File metadata
- Download URL: cadence_python_client-0.2.1.tar.gz
- Upload date:
- Size: 425.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2d14c15b56a87ab33ca240276d07e93f3d12a1bebdd1271981eb4dc94f6378a
|
|
| MD5 |
59f78c997029db58cd7940f4edd4803c
|
|
| BLAKE2b-256 |
4fd36977d43ba0d683744c685c0bd6ed875d67f5e0d0bd5a250e1f23fe1e0de0
|
Provenance
The following attestation bundles were made for cadence_python_client-0.2.1.tar.gz:
Publisher:
python-publish.yml on cadence-workflow/cadence-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cadence_python_client-0.2.1.tar.gz -
Subject digest:
f2d14c15b56a87ab33ca240276d07e93f3d12a1bebdd1271981eb4dc94f6378a - Sigstore transparency entry: 1298032624
- Sigstore integration time:
-
Permalink:
cadence-workflow/cadence-python-client@97fad9ce8c235da943418b4f30c8249b0ef47f57 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/cadence-workflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@97fad9ce8c235da943418b4f30c8249b0ef47f57 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cadence_python_client-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cadence_python_client-0.2.1-py3-none-any.whl
- Upload date:
- Size: 298.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e696fdb3031a2b4b108700bf5744902a50ac1339d0c78b571846f37b2907988f
|
|
| MD5 |
2919bc7421e6bc61fd7f52815b712378
|
|
| BLAKE2b-256 |
8083c0be26401ec0cac485569c4b4a96a4eb104f97e19d1c756c5191a574ef46
|
Provenance
The following attestation bundles were made for cadence_python_client-0.2.1-py3-none-any.whl:
Publisher:
python-publish.yml on cadence-workflow/cadence-python-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cadence_python_client-0.2.1-py3-none-any.whl -
Subject digest:
e696fdb3031a2b4b108700bf5744902a50ac1339d0c78b571846f37b2907988f - Sigstore transparency entry: 1298032728
- Sigstore integration time:
-
Permalink:
cadence-workflow/cadence-python-client@97fad9ce8c235da943418b4f30c8249b0ef47f57 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/cadence-workflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@97fad9ce8c235da943418b4f30c8249b0ef47f57 -
Trigger Event:
release
-
Statement type: