Common

ConnectionConfig

class lahja.common.ConnectionConfig

Bases: tuple

Configuration class needed to establish Endpoint connections.

classmethod from_name(name: str, base_path: Optional[pathlib.Path] = None) → lahja.common.ConnectionConfig
name

Alias for field number 0

path

Alias for field number 1

BaseEvent

class lahja.common.BaseEvent

Bases: object

bind(endpoint: EndpointAPI, id: Optional[NewType.<locals>.new_type]) → None
broadcast_config(internal: bool = False) → lahja.common.BroadcastConfig
get_origin() → str
is_bound = False

BaseRequestResponseEvent

class lahja.common.BaseRequestResponseEvent

Bases: abc.ABC, lahja.common.BaseEvent, typing.Generic

static expected_response_type() → Type[TResponse]

Return the type that is expected to be send back for this request. This ensures that at runtime, only expected responses can be send back to callsites that issued a BaseRequestResponseEvent

BroadcastConfig

class lahja.common.BroadcastConfig(filter_endpoint: Optional[str] = None, filter_event_id: Optional[NewType.<locals>.new_type] = None, internal: bool = False)

Bases: object

allowed_to_receive(endpoint: str) → bool

Subscription

class lahja.common.Subscription(unsubscribe_fn: Callable[Any])

Bases: object

unsubscribe() → None