@@ -86,7 +86,7 @@ are reasonably representable in JSON.
86
86
General Message Format
87
87
======================
88
88
89
- A message is defined by the following four-dictionary structure::
89
+ A message can be represented as the following structure::
90
90
91
91
{
92
92
# The message header contains a pair of unique identifiers for the
@@ -105,7 +105,7 @@ A message is defined by the following four-dictionary structure::
105
105
'msg_type' : str,
106
106
# the message protocol version
107
107
'version' : '5.0',
108
- },
108
+ },
109
109
110
110
# In a chain of messages, the header from the parent is copied so that
111
111
# clients can track where messages come from.
@@ -123,6 +123,15 @@ A message is defined by the following four-dictionary structure::
123
123
'buffers': list,
124
124
}
125
125
126
+ .. note ::
127
+
128
+ This dictionary structure is *not * part of the Jupyter protocol
129
+ that must be implemented by kernels and frontends;
130
+ that would be :ref: `wire_protocol `,
131
+ which dictates how this information is serialized over the wire.
132
+ Deserialization is up to the Kernel or frontend implementation,
133
+ but a dict like this would be a logical choice in most contexts.
134
+
126
135
.. note ::
127
136
128
137
The ``session `` id in a message header identifies a unique entity with state,
@@ -182,14 +191,17 @@ The Wire Protocol
182
191
=================
183
192
184
193
185
- This message format exists at a high level ,
194
+ The above message format is only a logical representation of the contents of Jupyter messages ,
186
195
but does not describe the actual *implementation * at the wire level in zeromq.
187
- The canonical implementation of the message spec is our :class: `~jupyter_client.session.Session ` class.
196
+ This section describes the protocol that must be implemented by Jupyter kernels and clients
197
+ talking to each other over zeromq.
198
+
199
+ The reference implementation of the message spec is our :class: `~jupyter_client.session.Session ` class.
188
200
189
201
.. note ::
190
202
191
203
This section should only be relevant to non-Python consumers of the protocol.
192
- Python consumers should simply import and the use implementation of the wire
204
+ Python consumers should import and the use implementation of the wire
193
205
protocol in :class: `jupyter_client.session.Session `.
194
206
195
207
Every message is serialized to a sequence of at least six blobs of bytes:
0 commit comments