Skip to main content

Add your description here

Project description

Camunda Orchestration Cluster API – Python SDK

PyPI - Version

Installing the SDK to your project

pip install camunda-orchestration-sdk

Using the generated SDK

The generated SDK provides two convenience clients:

  • CamundaClient: sync-only convenience client.
  • CamundaAsyncClient: async-only convenience client.

Quick start (Zero-config – recommended)

Keep configuration out of application code. Let the client read CAMUNDA_* variables from the environment (12-factor style). This makes secret rotation, environment promotion (dev → staging → prod), and operational tooling (vaults / secret managers) safer and simpler.

If no configuration is present, the SDK defaults to a local Camunda 8 Run-style endpoint at http://localhost:8080/v2.

from camunda_orchestration_sdk import CamundaClient, CamundaAsyncClient

# Zero-config construction: reads CAMUNDA_* from the environment
client = CamundaClient()
async_client = CamundaAsyncClient()

Typical .env (example):

CAMUNDA_REST_ADDRESS=https://cluster.example/v2
CAMUNDA_AUTH_STRATEGY=OAUTH
CAMUNDA_CLIENT_ID=***
CAMUNDA_CLIENT_SECRET=***

Advanced: Programmatic configuration (use sparingly)

Only use configuration={...} when you must supply or mutate configuration dynamically (e.g. tests, multi-tenant routing, or ephemeral preview environments). Keys mirror their CAMUNDA_* environment names.

from camunda_orchestration_sdk import CamundaClient

client = CamundaClient(
    configuration={
        "CAMUNDA_REST_ADDRESS": "http://localhost:8080/v2",
        "CAMUNDA_AUTH_STRATEGY": "NONE",
    }
)

Loading configuration from a .env file (CAMUNDA_LOAD_ENVFILE)

The SDK can optionally load configuration values from a dotenv file.

  • Set CAMUNDA_LOAD_ENVFILE=true (or 1 / yes) to load .env from the current working directory.
  • Set CAMUNDA_LOAD_ENVFILE=/path/to/file.env to load from an explicit path.
  • If the file does not exist, it is silently ignored.
  • Precedence is: .env < environment variables < explicit configuration={...} passed to the client.
  • The resolver reads dotenv values without mutating os.environ.

Example .env:

CAMUNDA_REST_ADDRESS=http://localhost:8080/v2
CAMUNDA_CLIENT_ID=your-client-id
CAMUNDA_CLIENT_SECRET=your-client-secret

Enable loading from the current directory:

export CAMUNDA_LOAD_ENVFILE=true
python your_script.py

Or enable loading from a specific file:

export CAMUNDA_LOAD_ENVFILE=~/camunda/dev.env
python your_script.py

You can also enable it via the explicit configuration dict:

from camunda_orchestration_sdk import CamundaClient

client = CamundaClient(configuration={"CAMUNDA_LOAD_ENVFILE": "true"})

Synchronous Usage

from camunda_orchestration_sdk import CamundaClient

# Configure via environment (recommended): CAMUNDA_REST_ADDRESS / auth vars
with CamundaClient() as client:
    topology = client.get_topology()
    print(topology)

Asynchronous Usage

import asyncio
from camunda_orchestration_sdk import CamundaAsyncClient

async def main():
    # Configure via environment (recommended): CAMUNDA_REST_ADDRESS / auth vars
    async with CamundaAsyncClient() as client:
        topology = await client.get_topology()
        print(topology)

asyncio.run(main())

Logging

The SDK uses loguru for logging. You can control the log level by setting the LOGURU_LEVEL environment variable.

# Run with INFO level (default is DEBUG)
LOGURU_LEVEL=INFO python your_script.py

# Run with WARNING level
LOGURU_LEVEL=WARNING python your_script.py

# Run with TRACE level (more verbose than DEBUG)
LOGURU_LEVEL=TRACE python your_script.py

License

Apache-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

camunda_orchestration_sdk-1.1.2.tar.gz (761.9 kB view details)

Uploaded Source

Built Distribution

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

camunda_orchestration_sdk-1.1.2-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file camunda_orchestration_sdk-1.1.2.tar.gz.

File metadata

File hashes

Hashes for camunda_orchestration_sdk-1.1.2.tar.gz
Algorithm Hash digest
SHA256 6f4636f89b09e730d96acfc1e73ee9e0c093c03bf34fa9f292eb05d216dabdf5
MD5 28a15b6c560d75dba62d580b1a2accf7
BLAKE2b-256 1dd8daa5c2d5e3bb3234d431000c75c41bd6fa8e040d223992464ba90ac4122c

See more details on using hashes here.

Provenance

The following attestation bundles were made for camunda_orchestration_sdk-1.1.2.tar.gz:

Publisher: publish.yml on camunda/orchestration-cluster-api-python

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

File details

Details for the file camunda_orchestration_sdk-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for camunda_orchestration_sdk-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d934fdee8b1852302b2808c97892ad8bfb0fdbce5ea05f241dcd4af85f0f45e6
MD5 9a68d1d80405c835eb23aaa3c58c351e
BLAKE2b-256 623216d00d6ad1293ae549d1b123c47a67323a9b5a5c35c527b83eef76df13a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for camunda_orchestration_sdk-1.1.2-py3-none-any.whl:

Publisher: publish.yml on camunda/orchestration-cluster-api-python

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