Skip to Content
Client LibrariesPythonGetting Started

Getting Started

Installation

pip install processcube_client

Unterstützte Python-Versionen: 3.11, 3.12, 3.13

ExternalTaskClient (empfohlen)

Der schnellste Einstieg — einen Worker für ein Topic registrieren:

from processcube_client import ExternalTaskClient def handle_task(payload): print(f"Verarbeite: {payload}") return {"ergebnis": "fertig"} client = ExternalTaskClient("http://localhost:56100") client.subscribe_to_external_task_topic("meinTopic", handle_task) client.start()

ClientFactory

Für den Zugriff auf verschiedene API-Clients:

from processcube_client import ClientFactory factory = ClientFactory() # Verschiedene Clients erstellen et_client = factory.create_external_task_client("http://localhost:56100") pd_client = factory.create_process_definition_client("http://localhost:56100") pi_client = factory.create_process_instance_client("http://localhost:56100") ut_client = factory.create_user_task_client("http://localhost:56100") ev_client = factory.create_event_client("http://localhost:56100") not_client = factory.create_notification_client("http://localhost:56100") fni_client = factory.create_flow_node_instance_client("http://localhost:56100") ai_client = factory.create_app_info_client("http://localhost:56100")

Synchroner Client (für Robot Framework)

Für synchrone Kontexte steht eine aggregierte Client-Klasse bereit:

from processcube_client.core.api.client import Client client = Client("http://localhost:56100") info = client.info()

Der synchrone Client ist für Robot Framework und einfache Scripting-Aufgaben gedacht. Für External Tasks und Notifications verwenden Sie die asynchronen Clients.

Nächste Schritte