ctdclient.eventmanager module

class ctdclient.eventmanager.EventManager[source]

Bases: object

Central event manager to handle communication between components, in the spirit of the observer pattern.

subscribe(event_name, callback)[source]

Register a listener for a specific event.

unsubscribe(event_name, callback)[source]

Remove a listener for a specific event.

publish(event_name, *args, **kwargs)[source]

Notify all listeners of an event.