Packet data structures#

At the router level:

{
    "packet_id": "str",
    "type": "request|response",
    "data": {...}
}

The packets which can be sent at the client level:

class zonis.Packet[source]#

Bases: TypedDict

data: Any#
type: Literal['IDENTIFY', 'REQUEST', 'SUCCESS_RESPONSE', 'FAILURE_RESPONSE', 'CLIENT_REQUEST', 'CLIENT_REQUEST_RESPONSE']#
identifier: str#
class zonis.RequestPacket[source]#

Bases: TypedDict

route: str#
arguments: Dict[str, Any]#
class zonis.IdentifyDataPacket[source]#

Bases: TypedDict

override_key: Optional[str]#
secret_key: str#
class zonis.IdentifyPacket[source]#

Bases: TypedDict

identifier: str#
type: Literal['IDENTIFY']#
data: IdentifyDataPacket#
class zonis.ClientToServerPacket[source]#

Bases: TypedDict

identifier: str#
type: Literal['CLIENT_REQUEST']#
data: RequestPacket#