Events#

Base types for events in Alert API.

class alertapi.events.base_events.ClientConnectedEvent(*, api: client.APIClient)[source]#

Event fired when client connected to API SSE endpoint.

class alertapi.events.base_events.Event[source]#

Base event type that all AlertAPI events should subclass.

abstract property api: client.APIClient#

App instance for this application.

Returns

The APIClient app.

Return type

alertapi.impl.client.APIClient

classmethod dispatches() Sequence[Type[Event]][source]#

Sequence of the event classes this event is dispatched as.

class alertapi.events.base_events.PingEvent(*, api: client.APIClient)[source]#

Event fired when SSE endpoint sends ping packet (every 5 seconds).

class alertapi.events.base_events.StateUpdateEvent(*, api: client.APIClient, state: states.State)[source]#

Event fired when one of 25 states has updated.