{ } Raw JSON

bundles / jupyter_client 8.10.0 / jupyter_client / session / Session / deserialize

function

jupyter_client.session:Session.deserialize

source: /jupyter_client/session.py:1026

Signature

def deserialize(self, msg_list: list[bytes] | list[zmq.Message], content: bool = True, copy: bool = True) → dict[str, t.Any]

Summary

Unserialize a msg_list to a nested message dict.

Extended Summary

This is roughly the inverse of serialize. The serialize/deserialize methods work with full message lists, whereas pack/unpack work with the individual message parts in the message list.

Parameters

msg_list : list of bytes or Message objects

The list of message parts of the form [HMAC,p_header,p_parent, p_metadata,p_content,buffer1,buffer2,...].

content : bool (True)

Whether to unpack the content dict (True), or leave it packed (False).

copy : bool (True)

Whether msg_list contains bytes (True) or the non-copying Message objects in each place (False).

Returns

msg : dict

The nested message dict with top-level keys [header, parent_header, content, buffers]. The buffers are returned as memoryviews.

Aliases

  • jupyter_client.channels.Session.deserialize