Module containing registered callbacks for various events. These events are how various parts of can communicate with the frontend runner or a user’s custom runner setup. These callbacks should not be used to trigger backend changes, that is the responsibility of the library internals.

async dispatch_event(event: str, *args: Any, **kwargs: Any) None

Dispatch an event to a set handler, if one exists. Will ignore handler errors, just print a log

  • event – Name of the event to dispatch

  • args – Arguments to the callback

  • kwargs – Keyword arguments to the callback

set_callback(cb: Callable[[...], Coroutine[None, None, None]], event: str) None

Set the callback to use for a specific event

  • cb – Callback to use

  • event – Name of the event to register for

get_callback(event: str) Callable[[...], Coroutine[None, None, None]]

Get the current callback for an event, or raise an exception if one isn’t set


event – Event to get callback for


Callback for event, if one is set

remove_callback(event: str) Optional[Callable[[...], Coroutine[None, None, None]]]

Remove the callback set for an event, returning it, or None if one isn’t set


event – Event to remove callback for


Callback that was previously set or None