bundles / jupyter_client latest / 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 objectsThe 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: dictThe nested message dict with top-level keys [header, parent_header, content, buffers]. The buffers are returned as memoryviews.
Aliases
jupyter_client.channels.Session.deserialize