A hands-on lab project demonstrating how to build Camunda 8 job workers using the Camunda Python SDK.
- Python 3.10+
- A Camunda 8 cluster (SaaS or local Camunda 8 Run)
- One of the following IDEs:
- Visual Studio Code with the Python extension
- PyCharm
git clone https://github.com/camunda-academy/c8-develop-workers-python-lab.git
cd c8-develop-workers-python-labpip install -r requirements.txtCopy .env.example to .env and fill in your Camunda cluster credentials:
cp .env.example .envThen edit .env with your values:
| Variable | Description |
|---|---|
CAMUNDA_REST_ADDRESS |
Your cluster's REST API address. This might be under ZEEBE_REST_ADDRESS in the exported credentials |
CAMUNDA_AUTH_STRATEGY |
Set to OAUTH for SaaS, NONE for local Camunda 8 Run |
CAMUNDA_CLIENT_ID |
OAuth client ID from your Camunda cluster |
CAMUNDA_CLIENT_SECRET |
OAuth client secret from your Camunda cluster |
CAMUNDA_OAUTH_URL |
OAuth token URL (SaaS default: https://login.cloud.camunda.io/oauth/token) |
CAMUNDA_TOKEN_AUDIENCE |
OAuth audience (SaaS default: zeebe.camunda.io) |
Note: The app loads these from the
.envfile automatically via python-dotenv.
python main.py(make sure you have deployed order.bpmn from the resources directory to your cluster beforehand)
You should see:
Workers started. Press Ctrl+C to exit.
Press Ctrl+C to stop the workers.
main.py # Entry point — sets up workers and starts the client
handlers/
order_handlers.py # Job handler implementations
services/
process_starter.py # Starts process instances
tracking_order_service.py # Business logic for order tracking
utilities/
fake_randomizer.py # Helper utilities
resources/
bpmn/
order.bpmn # BPMN process definition
If the application fails to start with an authentication error, verify your environment variables are correctly set. The error output will indicate which variables are MISSING.
This project is licensed under the Apache License 2.0.