Python SDK for authoring Cadence workflows and activities
Project description
Cadence Python SDK
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.
The Cadence Python SDK is the framework for authoring workflows and activities using the Python programming language.
Installation
Install from PyPI:
pip install cadence-python-client
Or with uv:
uv add cadence-python-client
The core package supports Python >=3.11,<3.14.
The SDK is ready for production use using PYPI. To build from source, clone the repository and install the development dependencies.
Clone the repository if you want to develop locally:
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 sync --all-extras
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 only if you change files under idls/proto/:
# Recommended
make generate
# Or run the script directly
uv run python scripts/generate_proto.py
This will:
- Generate Python protobuf files in
cadence/api/v1/ - Generate gRPC service files in
cadence/api/v1/ - Refresh the package imports for the generated modules
Test
Run the main checks:
make lint
make type-check
make test
Run integration tests with Docker:
make integration-test
You can also verify the generated files manually:
uv run python cadence/sample/simple_usage_example.py
uv run python cadence/sample/grpc_usage_example.py
Development Commands
The current repository workflow is centered on make targets:
make install
make generate
make lint
make type-check
make test
make integration-test
make pr
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.3.0.tar.gz.
File metadata
- Download URL: cadence_python_client-0.3.0.tar.gz
- Upload date:
- Size: 471.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e2f8d277100a77b1e322c10b5bfc6c0f731f77b0c81af7226de5d69bebbeda7
|
|
| MD5 |
d81a799edaf89fb7337105cabb6e6479
|
|
| BLAKE2b-256 |
213feb48275117d29efeef3b6242979cf588b867ada1f8776af5681dd94bc861
|
Provenance
The following attestation bundles were made for cadence_python_client-0.3.0.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.3.0.tar.gz -
Subject digest:
1e2f8d277100a77b1e322c10b5bfc6c0f731f77b0c81af7226de5d69bebbeda7 - Sigstore transparency entry: 1828942763
- Sigstore integration time:
-
Permalink:
cadence-workflow/cadence-python-client@b56dfde2aa671dcd4d716a067928c3c2788064b8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/cadence-workflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b56dfde2aa671dcd4d716a067928c3c2788064b8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cadence_python_client-0.3.0-py3-none-any.whl.
File metadata
- Download URL: cadence_python_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 325.5 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 |
886214ad43c844f5fa8af1cce3a28433560380ba0c2814da908af8fa99632648
|
|
| MD5 |
c4c24357da10cd9fd442799394b815f4
|
|
| BLAKE2b-256 |
df501ea448e0ec09c4a41cbb6488b5e1f053a6d4b1868fb2d8f75f3baa201e16
|
Provenance
The following attestation bundles were made for cadence_python_client-0.3.0-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.3.0-py3-none-any.whl -
Subject digest:
886214ad43c844f5fa8af1cce3a28433560380ba0c2814da908af8fa99632648 - Sigstore transparency entry: 1828942790
- Sigstore integration time:
-
Permalink:
cadence-workflow/cadence-python-client@b56dfde2aa671dcd4d716a067928c3c2788064b8 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/cadence-workflow
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b56dfde2aa671dcd4d716a067928c3c2788064b8 -
Trigger Event:
release
-
Statement type: