Python REST api client for the workflow and decision automation engine Camunda.

pklauke, updated 🕥 2022-10-26 14:24:40

Build Status codecov Documentation Status

PyCamunda

PyCamunda is a Python REST api client for the workflow and decision automation engine Camunda.

PyCamunda takes care of Camunda-specific characteristics and gives you an intuitive Python interface so you can focus on developing your actual business application. So PyCamunda deals with http requests, nested dictionaries, camelCase keys, datetime formatting and more for you.

Simply.. * .. create an instance of the PyCamunda class corresponding to a Camunda endpoint, * .. configure it using keyword arguments and methods, * .. send the request and get the response serialized in a Python data class.

```python import pycamunda.processinst

url = 'http://localhost/engine-rest'

get_instances = pycamunda.processinst.GetList(url, process_definition_key='MyProcess') instances = get_instances()

for instance in instances: print('Process instance id:', instance.id_) Output:console Process instance id: 174cb832-a8a7-11ea-8129-0242ac110002 Process instance id: 1a70a8e9-a7ed-11ea-8129-0242ac110002 ... ```

Installation

PyCamunda requires Python >= 3.7 and can be installed from the offical Python Package Index.

$ pip install pycamunda

Documentation

The latest documentation can be found here.

Issues

Any plan to add `/history/*` ?

opened on 2023-03-24 20:45:01 by arkanoid87

These calls can be used to retrieve history of committed tasks

https://docs.camunda.org/manual/7.8/reference/rest/history/

please add pycamunda.task.Delete

opened on 2023-03-21 01:20:05 by kabol

Hi,

can you add pycamunda.task.Delete pls. per https://docs.camunda.org/manual/7.18/reference/rest/task/delete/

``` class Delete(pycamunda.base.CamundaRequest):

task_id = PathParameter('id')

def __init__(self, url: str, task_id: str):
    """Delete a task.

    :param url: Camunda Rest engine URL.
    :param task_id: Id of the task.
    """
    super().__init__(url=url + URL_SUFFIX + '/{id}')
    self.task_id = task_id

def __call__(self, *args, **kwargs) -> None:
    """Send the request."""
    super().__call__(pycamunda.base.RequestMethod.DELETE, *args, **kwargs)

```

Message Correlation with results Failure

opened on 2022-10-26 13:47:08 by aristidebm

When I try to correlate a message with results and variables in results, result loading fails with KeyError https://github.com/fasfoxcom/pycamunda/blob/master/pycamunda/message.py#L52. Here is the link of the doc https://docs.camunda.org/manual/7.17/reference/rest/message/post-message/#response-2. According to the doc, there is an error in the loading logic.

python camunda rest-client camunda-bpm-platform camunda-external-task