Hello,
So far, I have worked with Java Spring Framework to create clients for Zeebe API. Now I would like to create python clients for Camunda 8.7 (self-managed) and newer versions. I found some documentation in the camunda official documentation but it does not help me till now. Here is the link: Generating a Zeebe-Python Client Stub in Less Than An Hour | Camunda
I found also a GitHub repo that talk about it ( Stéphane Ludwig / zeebe-python-grpc · GitLab ). I took also a look on the official documentation of pyzeebe - the python library to create a camunda client over grpc protocol - but it still not working.
When I run my code, I get always a Runtime exception, from which I don’t know where to start debugging. Could someone has some idea or already build any zeebe client using python or Django ?
I am working on a windows 11 machine.
Code:
import asyncio
from pyzeebe import ZeebeClient, ZeebeWorker, Job, JobController, create_insecure_channel
channel = create_insecure_channel(grpc_address=“host.com:26500”) # Create grpc channel
worker = ZeebeWorker(channel)
client = ZeebeClient(channel)
async def main():
process_instance_key, process_result = await client.run_process_with_result(
bpmn_process_id=“pythonTestProcess”,
timeout=10000)
return process_instance_key, process_result
if **name** == “\_\_**main_\_**”:
asyncio.run(main())
Exception:
RuntimeError: Task <Task pending name=‘Task-1’ coro=<main() running at C:\Users…\from-doc.py:13> cb=[_run_until_complete_cb() at C:\Users…\AppData\Local\Programs\Python\Python313\Lib\asyncio\base_events.py:181]> got Future <Task pending name=‘Task-2’ coro=<UnaryUnaryCall._invoke() running at C:\Users…\Desktop\camunda-python-client.venv\Lib\site-packages\grpc\aio_call.py:573>> attached to a different loop
Task was destroyed but it is pending!