Skip to main content

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
  • APIs and interfaces are subject to change without notice

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.

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

  1. Install protobuf (required):

    # macOS
    brew install protobuf@29
    
    # Linux/Other
    # Install protobuf 29.x via your package manager
    
  2. 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
    
  3. 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

cadence_python_client-0.2.3.tar.gz (465.7 kB view details)

Uploaded Source

Built Distribution

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

cadence_python_client-0.2.3-py3-none-any.whl (319.7 kB view details)

Uploaded Python 3

File details

Details for the file cadence_python_client-0.2.3.tar.gz.

File metadata

  • Download URL: cadence_python_client-0.2.3.tar.gz
  • Upload date:
  • Size: 465.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cadence_python_client-0.2.3.tar.gz
Algorithm Hash digest
SHA256 cce3e729b35e4fd6c80525ffe1ea6d2e8e7aada2b379f2078685f892a453cd2d
MD5 6014ad8752fd21fda968337e3b0ce8f2
BLAKE2b-256 2f8fedb7ef8bb55a3aca0a096e6f74a91d5f66fedced43ed02a956c6b7c197b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cadence_python_client-0.2.3.tar.gz:

Publisher: python-publish.yml on cadence-workflow/cadence-python-client

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

File details

Details for the file cadence_python_client-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cadence_python_client-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91740205ce8137ac97e2d116b1177d924ac62b193bef341e1f411b7a77978f11
MD5 5258e2308d17cd0c9603ed2d38e07577
BLAKE2b-256 a3720fd7b574532a927e22b1378f90911c43397eaf25647f44edc783cfeaa54a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cadence_python_client-0.2.3-py3-none-any.whl:

Publisher: python-publish.yml on cadence-workflow/cadence-python-client

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