Module Import alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr BoolOpOr NameLoad Str If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr BoolOpOr NameLoad AttributeLoad Call AttributeLoad NameLoad attr attr If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr ListLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad Str attr ListLoad NameLoad Str AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list
N/A N/A uuid N/A FRAME_ERROR_TYPE error N/A FRAME_RESPONSE_TYPE response N/A FRAME_MESSAGE_TYPE message N/A MAGIC_V1 V1 MessageError N/A Exception N/A N/A  exception raised when a message doesn't validate  N/A Message N/A object N/A N/A  A class to abstract our simple message format used in stream.

    a Message is constructed with a header that starts with the magic bit
    telling us the protocol version, then it add a space followed by the type
    of the message and another space followed by the message id and finally a
    null byte:

        V1 type messageid

    The body follow the null byte. Then a full message is:

        V1 type messageidbody

    This simple messaging protocol allows us to pass any kind of blob as a
    body and eventually a json while still beeing able to know the type of the
    message.
     __init__ N/A N/A self body id type N/A None None FRAME_MESSAGE_TYPE N/A N/A N/A self body N/A body N/A N/A N/A isinstance N/A self body bytes N/A N/A N/A self body N/A N/A N/A self body encode utf-8 N/A N/A self id N/A id N/A N/A N/A uuid uuid4 hex N/A N/A N/A isinstance N/A self id bytes N/A N/A N/A self id N/A N/A N/A self id encode utf-8 N/A N/A self type type N/A __str__ N/A N/A self N/A N/A N/A N/A Message: %s N/A N/A N/A self id decode utf-8 N/A decode_frame N/A N/A cls frame N/A N/A N/A N/A N/A isinstance frame bytes N/A N/A frame N/A N/A frame encode utf-8 N/A N/A N/A N/A header body N/A N/A frame split N/A N/A _ type id N/A N/A header split N/A N/A cls body id id type type N/A N/A N/A ValueError N/A N/A N/A MessageError N/A invalid message %r frame N/A classmethod encode N/A N/A self N/A N/A N/A  encode a message to bytes  N/A header N/A N/A join N/A MAGIC_V1 N/A self type N/A self id N/A N/A N/A join N/A header N/A self body N/A N/A decode_frame N/A N/A frame N/A N/A N/A N/A N/A Message decode_frame frame N/A make_response N/A N/A body id N/A None N/A N/A N/A Message body id id type FRAME_RESPONSE_TYPE N/A