This module provides access to the deployment REST api of Camunda.


class pycamunda.deployment.Deployment(id_: str, name: str, source: str, tenant_id: str, deployment_time: Optional[datetime.datetime] = None)

Data class of deployment as returned by the REST api of Camunda.

deployment_time = None


class pycamunda.deployment.Resource(id_: str, name: str, deployment_id: str)

Data class of resource as returned by the REST api of Camunda.


class pycamunda.deployment.GetList(url: str, id_: Optional[str] = None, name: Optional[str] = None, name_like: Optional[str] = None, source: Optional[str] = None, without_source: Optional[bool] = None, tenant_id_in: Optional[Iterable[str]] = None, without_tenant_id: bool = False, include_deployments_without_tenant_id: bool = False, after: Optional[datetime.datetime] = None, before: Optional[datetime.datetime] = None, sort_by: Optional[str] = None, ascending: bool = True, first_result: Optional[int] = None, max_results: Optional[int] = None)

Get a list of deployments.

  • url – Camunda Rest engine URL.
  • id – Filter by id.
  • name – Filter by name.
  • name_like – Filter by a substring of the name.
  • source – Filter by deployment source.
  • without_source – Filter deployments without source.
  • tenant_id_in – Filter whether the tenant id is one of multiple ones.
  • without_tenant_id – Whether to include only deployments that belong to no tenant.
  • include_deployments_without_tenant_id – Whether to include deployments that belong to no tenant.
  • after – Filter by the deployment date after the provided data.
  • before – Filter by the deployment date before the provided data.
  • sort_by – Sort the results by ‘id’, ‘name’, ‘deployment_time’ or ‘tenant_id’.
  • ascending – Sort order.
  • first_result – Pagination of results. Index of the first result to return.
  • max_results – Pagination of results. Maximum number of results to return.
__call__(*args, **kwargs) → Tuple[pycamunda.deployment.Deployment]

Send the request.


class pycamunda.deployment.Get(url: str, id_: str)

Get a deployment.

  • url – Camunda Rest engine url.
  • id – Id of the deployment.
__call__(*args, **kwargs) → pycamunda.deployment.Deployment

Send the request.


class pycamunda.deployment.Create(url: str, name: str, source: Optional[str] = None, enable_duplicate_filtering: bool = False, deploy_changed_only: bool = False, tenant_id: Optional[str] = None)

Create a deployment with one or multiple resources (e.g. bpmn diagrams).

  • url – Camunda Rest engine url
  • name – Name of the deployment.
  • source – Source of the deployment.
  • enable_duplicate_filtering – Whether to check if a deployment with the same name already exists. If one does, no new deployment is done.
  • deploy_changed_only – Whether to check if already deployed resources that are also contained in this deployment have changed. The ones that do not will not created again.
  • tenant_id – Id of the tenant to create the deployment for.
__call__(*args, **kwargs) → None

Send the request.

add_resource(file) → None

Add a resource to the deployment.

Parameters:file – Binary data of the resource.


class pycamunda.deployment.GetResources(url: str, id_: str)

Get the resources of a deployment.

  • url – Camunda Rest engine URL.
  • id – Id of the the deployment.
__call__(*args, **kwargs) → Tuple[pycamunda.deployment.Resource]

Send the request.


class pycamunda.deployment.GetResource(url: str, id_: str, resource_id: str, binary: bool = False)

Get a resource of a deployment.

  • url – Camunda Rest engine URL.
  • id – Id of the the deployment.
  • resource_id – Id of the resource.
  • binary – Whether to request binary content of the resource.
__call__(*args, **kwargs) → Union[pycamunda.deployment.Resource, ByteString]

Send the request.


class pycamunda.deployment.Delete(url: str, id_: str, cascade: bool = False, skip_custom_listeners: bool = False, skip_io_mappings: bool = False)

Delete a deployment.

  • url – Camunda Rest engine URL.
  • id – Id of the the deployment.
  • cascade – Whether to cascade the action to all process instances (including historic).
  • skip_custom_listeners – Whether to skip custom listeners and notify only builtin ones.
  • skip_io_mappings – Whether to skip input/output mappings.
__call__(*args, **kwargs) → None

Send the request.