All docs
Context·
property
Context.events
the running app's event bus, to subscribe or emit
Python
events: EventBus
Returns EventBus — the running app's event bus, or None
Example#
Python
@tool.command("demo/watch")
def watch(ctx: Context):
ctx.events.on("engine/run/finished", on_done)
Notes#
Subscribe with on(pattern, handler) or emit topics — use the topic enums (Events,
ViewerEvents, …), not raw strings. Handlers are async. A lazily populated slot — None when no
bus is available.
See also#
Guides: Commands & actions
By LSD Team · Last updated Jul 17, 2026
Ask on Discord
View as Markdown