runtimepy.message.types
index
/home/vkottler/src/vkottler/workspace/runtimepy/runtimepy/message/types.py

A module containing useful type definitions for JSON messaging.

 
Data
        Awaitable = typing.Awaitable
Callable = typing.Callable
DEFAULT_LOOPBACK = {'a': 1, 'b': 2, 'c': 3}
DEFAULT_TIMEOUT = 3
JsonMessage = dict[str, typing.Any]
MessageHandler = typing.Callable[[dict[str, typing.Any], dict[str, typing.Any]], typing.Awaitable[NoneType]]
MessageHandlers = dict[str, typing.Callable[[dict[str, typing.Any]...t[str, typing.Any]], typing.Awaitable[NoneType]]]
RESERVED_KEYS = {'__id__', '__log_messages__', 'keys_ignored'}
T = ~T
TypedHandler = typing.Callable[[dict[str, typing.Any], ~T], typing.Awaitable[NoneType]]