{"id":13408238,"url":"https://github.com/camunda-community-hub/pyzeebe","last_synced_at":"2025-05-16T08:03:20.782Z","repository":{"id":37093198,"uuid":"289557083","full_name":"camunda-community-hub/pyzeebe","owner":"camunda-community-hub","description":"Python client for Zeebe workflow engine","archived":false,"fork":false,"pushed_at":"2025-05-06T18:09:46.000Z","size":2146,"stargazers_count":91,"open_issues_count":17,"forks_count":38,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T08:02:37.992Z","etag":null,"topics":["camunda","camunda-8","python","zeebe"],"latest_commit_sha":null,"homepage":"https://camunda-community-hub.github.io/pyzeebe/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/camunda-community-hub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-22T19:53:37.000Z","updated_at":"2025-05-06T18:08:53.000Z","dependencies_parsed_at":"2023-11-24T09:28:16.730Z","dependency_job_id":"254cd6a8-f602-40ce-857f-6b3849292aa2","html_url":"https://github.com/camunda-community-hub/pyzeebe","commit_stats":{"total_commits":715,"total_committers":12,"mean_commits":"59.583333333333336","dds":"0.27552447552447557","last_synced_commit":"807959d3c9bd0e26966c0720c4cf0c31471e383a"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fpyzeebe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fpyzeebe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fpyzeebe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camunda-community-hub%2Fpyzeebe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camunda-community-hub","download_url":"https://codeload.github.com/camunda-community-hub/pyzeebe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493381,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["camunda","camunda-8","python","zeebe"],"created_at":"2024-07-30T20:00:51.612Z","updated_at":"2025-05-16T08:03:20.765Z","avatar_url":"https://github.com/camunda-community-hub.png","language":"Python","funding_links":[],"categories":["Building","Clients and Programming Framework Integrations"],"sub_categories":["Workflows"],"readme":"[![](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/camunda-community-hub/community)\n[![](https://img.shields.io/badge/Lifecycle-Stable-brightgreen)](https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#stable-)\n![Compatible with: Camunda Platform 8](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%208-0072Ce)\n\n[![Coverage Status](https://coveralls.io/repos/github/JonatanMartens/pyzeebe/badge.svg?branch=master)](https://coveralls.io/github/JonatanMartens/pyzeebe?branch=master)\n![Test pyzeebe](https://github.com/camunda-community-hub/pyzeebe/workflows/Test%20pyzeebe/badge.svg)\n![Integration test pyzeebe](https://github.com/camunda-community-hub/pyzeebe/workflows/Integration%20test%20pyzeebe/badge.svg)\n\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/camunda-community-hub/pyzeebe)\n![PyPI](https://img.shields.io/pypi/v/pyzeebe)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyzeebe)\n\n\n# Pyzeebe\n\npyzeebe is a python grpc client for Zeebe.\n\nZeebe version support:\n\n| Pyzeebe version | Tested Zeebe versions  |\n| :-------------: | ---------------------- |\n|      4.x.x      | 8.2, 8.3, 8.4, 8.5     |\n|      3.x.x      | 1.0.0                  |\n|      2.x.x      | 0.23, 0.24, 0.25, 0.26 |\n|      1.x.x      | 0.23, 0.24             |\n\n## Getting Started\n\nTo install:\n\n`pip install pyzeebe`\n\nFor full documentation please visit: https://camunda-community-hub.github.io/pyzeebe/\n\n## Usage\n\n### Worker\n\nThe `ZeebeWorker` class gets jobs from the gateway and runs them.\n\n```python\nimport asyncio\n\nfrom pyzeebe import ZeebeWorker, Job, JobController, create_insecure_channel\n\n\nchannel = create_insecure_channel(grpc_address=\"localhost:26500\") # Create grpc channel\nworker = ZeebeWorker(channel) # Create a zeebe worker\n\n\nasync def on_error(exception: Exception, job: Job, job_controller: JobController):\n    \"\"\"\n    on_error will be called when the task fails\n    \"\"\"\n    print(exception)\n    await job_controller.set_error_status(job, f\"Failed to handle job {job}. Error: {str(exception)}\")\n\n\n@worker.task(task_type=\"example\", exception_handler=on_error)\ndef example_task(input: str) -\u003e dict:\n    return {\"output\": f\"Hello world, {input}!\"}\n\n\n@worker.task(task_type=\"example2\", exception_handler=on_error)\nasync def another_example_task(name: str) -\u003e dict: # Tasks can also be async\n    return {\"output\": f\"Hello world, {name} from async task!\"}\n\nloop = asyncio.get_running_loop()\nloop.run_until_complete(worker.work()) # Now every time that a task with type `example` or `example2` is called, the corresponding function will be called\n```\n\nStop a worker:\n\n```python\nawait zeebe_worker.stop() # Stops worker after all running jobs have been completed\n```\n\n### Client\n\n```python\nfrom pyzeebe import ZeebeClient, create_insecure_channel\n\n# Create a zeebe client\nchannel = create_insecure_channel(grpc_address=\"localhost:26500\")\nzeebe_client = ZeebeClient(channel)\n\n# Run a Zeebe process instance\nprocess_instance_key = await zeebe_client.run_process(bpmn_process_id=\"My zeebe process\", variables={})\n\n# Run a process and receive the result\nprocess_instance_key, process_result = await zeebe_client.run_process_with_result(\n    bpmn_process_id=\"My zeebe process\",\n    timeout=10000\n)\n\n# Deploy a BPMN process definition\nawait zeebe_client.deploy_resource(\"process.bpmn\")\n\n# Cancel a running process\nawait zeebe_client.cancel_process_instance(process_instance_key=12345)\n\n# Publish message\nawait zeebe_client.publish_message(name=\"message_name\", correlation_key=\"some_id\")\n\n```\n\n## Tests\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install pyzeebe\n\n`pytest tests/unit`\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Versioning\n\nWe use [SemVer](semver.org) for versioning. For the versions available, see the tags on this repository.\n\n## License\n\nWe use the MIT license, see [LICENSE.md](LICENSE.md) for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamunda-community-hub%2Fpyzeebe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamunda-community-hub%2Fpyzeebe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamunda-community-hub%2Fpyzeebe/lists"}