interface — Interface

this page is under development — please check back soon

Classes

class eventsourcing.interface.NotificationLogInterface[source]

Bases: ABC

Abstract base class for obtaining serialised sections of a notification log.

abstract get_log_section(section_id: str) str[source]

Returns a serialised Section from a notification log.

abstract get_notifications(start: int, limit: int, topics: Sequence[str] = ()) str[source]

Returns a serialised list of Notification objects from a notification log.

class eventsourcing.interface.NotificationLogJSONService(app: TApplication)[source]

Bases: NotificationLogInterface, Generic[TApplication]

Presents serialised sections of a notification log.

__init__(app: TApplication)[source]

Initialises service with given application.

get_log_section(section_id: str) str[source]

Returns JSON serialised Section from a notification log.

get_notifications(start: int, limit: int, topics: Sequence[str] = ()) str[source]

Returns a serialised list of Notification objects from a notification log.

class eventsourcing.interface.NotificationLogJSONClient(interface: NotificationLogInterface)[source]

Bases: NotificationLog

Presents deserialized sections of a notification log.

__init__(interface: NotificationLogInterface)[source]

Initialises log with a given interface.

__getitem__(section_id: str) Section[source]

Returns a Section of Notification objects from the notification log.

select(start: int, limit: int, _: int | None = None, topics: Sequence[str] = ()) List[Notification][source]

Returns a selection of Notification objects from the notification log.