Add your description here
Project description
Camunda Orchestration Cluster API – Python SDK Generator
This project generates a Python SDK for the Camunda 8 Orchestration Cluster REST API from the OpenAPI specification.
Overview
- Fetches the OpenAPI spec via shallow clone from the public repository (fallback to local checked-out repo if offline).
- Generates the SDK using OpenAPI Generator (prefers
npx, falls back to Docker). - Provides an extensible hooks system for post-processing tasks.
Requirements
- Python 3.9+
- One of:
- Node.js with
npxavailable; or - Docker (for
openapitools/openapi-generator-cli)
- Node.js with
Quick start
cd orchestration-cluster-api-python
# Install deps and run generation (defaults to output in ./generated)
make generate
Generated SDK will be placed in generated/ by default. You can change this with --out-dir.
Using the generated SDK
The generated SDK provides a CamundaClient class that wraps the underlying API client and provides a unified interface for both synchronous and asynchronous operations.
Initialization
from camunda_orchestration_sdk import CamundaClient
# Unauthenticated (for local development)
client = CamundaClient(base_url="http://localhost:8080")
# Authenticated (for production/SaaS)
client = CamundaClient(
base_url="https://...",
token="your-access-token"
)
Synchronous Usage
with CamundaClient(base_url="http://localhost:8080") as client:
topology = client.get_topology()
print(topology)
Asynchronous Usage
import asyncio
from camunda_orchestration_sdk import CamundaClient
async def main():
async with CamundaClient(base_url="http://localhost:8080") as client:
topology = await client.get_topology_async()
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
Local fallback of the spec
If the network is not available or the remote repository cannot be reached, the generator will use the locally cloned spec at:
../camunda-orchestration-cluster-api/specification/rest-api.yaml
Ensure that repository is present in the workspace if you need offline generation.
Configuration
generator-config.yaml holds OpenAPI Generator options such as package name. You may add or tweak options there.
You can also pass CLI arguments:
python3 generate.py \
--out-dir ./generated \
--generator python \
--spec-ref main \
--package-name camunda_orchestration_sdk
Run python3 generate.py --help for all options.
Hooks (post-processing)
Add Python files under hooks/ exporting a run(context) function. Hooks are executed in sorted order after generation.
context includes:
out_dir: path to the generated SDK directoryspec_path: path to the spec used for generationconfig_path: path to the generator config filegenerator: the generator type used (defaultpython)
Example hook: see hooks/postprocess_example.py.
Acceptance tests (post-generation)
After generation and post-processing, acceptance tests run automatically unless --skip-tests is provided. Tests live under tests/acceptance/ and run against the generated package by injecting PYTHONPATH.
Run tests manually:
make test
Integration tests (opt-in)
Integration tests live in tests/integration and require a running server. They are skipped unless CAMUNDA_INTEGRATION=1 is set. By default, the client points to http://localhost:8080/v2; override with CAMUNDA_BASE_URL.
Run manually:
make itest
Make targets
make generate– run the generator (uses Python script)make clean– remove thegenerated/directory and cache
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
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 camunda_orchestration_sdk-0.1.0.tar.gz.
File metadata
- Download URL: camunda_orchestration_sdk-0.1.0.tar.gz
- Upload date:
- Size: 661.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
596e2420e85aeca77a74d3f7325854b08ce81b8a70d783a096d267ed8982bc15
|
|
| MD5 |
308e86f6bac2c3e275f49448392675c9
|
|
| BLAKE2b-256 |
61583f471f89bbdb3f6bbea00bbd5883f2c19ba8c2983414f57caf8342d3d9a2
|
Provenance
The following attestation bundles were made for camunda_orchestration_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on camunda/orchestration-cluster-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
camunda_orchestration_sdk-0.1.0.tar.gz -
Subject digest:
596e2420e85aeca77a74d3f7325854b08ce81b8a70d783a096d267ed8982bc15 - Sigstore transparency entry: 805333194
- Sigstore integration time:
-
Permalink:
camunda/orchestration-cluster-api-python@c78e604c816c7bd04e79ab5001f4abb9985752a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/camunda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c78e604c816c7bd04e79ab5001f4abb9985752a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file camunda_orchestration_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: camunda_orchestration_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bdaeddfe8c8c561f26da733cff9f0629c729b0f8f4c13075fac0fa9ed4bfc03
|
|
| MD5 |
7dd4cd2c1a61c1c5a7f453af36130cf1
|
|
| BLAKE2b-256 |
224e4c49caf7d260980a8caf4c148d7482243c98d2d4655a9ea82b6527ff6f80
|
Provenance
The following attestation bundles were made for camunda_orchestration_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on camunda/orchestration-cluster-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
camunda_orchestration_sdk-0.1.0-py3-none-any.whl -
Subject digest:
6bdaeddfe8c8c561f26da733cff9f0629c729b0f8f4c13075fac0fa9ed4bfc03 - Sigstore transparency entry: 805333198
- Sigstore integration time:
-
Permalink:
camunda/orchestration-cluster-api-python@c78e604c816c7bd04e79ab5001f4abb9985752a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/camunda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c78e604c816c7bd04e79ab5001f4abb9985752a7 -
Trigger Event:
push
-
Statement type: