bovine.types

class bovine.types.ServerSentEvent(data: str, event: str | None = None, id: str | None = None, retry: int | None = None)[source]

A server sent event as defined in Event Source Interface. This is used by the event_source function of the BovineClient.

encode() bytes[source]

Encodes the server sent event as bytes to send to the client.

static parse(raw: bytes)[source]

Parses bytes to ServerSentEvent

static parse_utf8(raw: str)[source]

Parses utf-8 encoded string to ServerSentEvent

class bovine.types.Visibility(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Defines the visiblity of an object. Currently only used for Actor, where endpoints are hidden from anyone by the owner.