##// END OF EJS Templates
update nbformat spec in sphinx
MinRK -
Show More
@@ -108,13 +108,13 b' Code cells'
108 Code cells are the primary content of Jupyter notebooks.
108 Code cells are the primary content of Jupyter notebooks.
109 They contain source code int e language of the document's associated kernel,
109 They contain source code int e language of the document's associated kernel,
110 and a list of outputs associated with executing.
110 and a list of outputs associated with executing.
111 They also have a prompt_number, which must be an integer or ``null``.
111 They also have an execution_count, which must be an integer or ``null``.
112
112
113 .. sourcecode:: python
113 .. sourcecode:: python
114
114
115 {
115 {
116 "cell_type" : "code",
116 "cell_type" : "code",
117 "prompt_number": 1, # integer or null
117 "execution_count": 1, # integer or null
118 "metadata" : {
118 "metadata" : {
119 "collapsed" : True, # whether the output of the cell is collapsed
119 "collapsed" : True, # whether the output of the cell is collapsed
120 "autoscroll": False, # any of true, false or "auto"
120 "autoscroll": False, # any of true, false or "auto"
@@ -131,6 +131,10 b' They also have a prompt_number, which must be an integer or ``null``.'
131
131
132 ``input`` was renamed to ``source``, for consistency among cell types.
132 ``input`` was renamed to ``source``, for consistency among cell types.
133
133
134 .. versionchanged:: 4.0
135
136 ``prompt_number`` renamed to ``execution_count``
137
134 Code cell outputs
138 Code cell outputs
135 -----------------
139 -----------------
136
140
@@ -170,11 +174,13 b' The metadata of these messages may be keyed by mime-type as well.'
170
174
171 {
175 {
172 "output_type" : "display_data",
176 "output_type" : "display_data",
173 "text/plain" : ["multiline text data"],
177 "data" : {
174 "image/png": ["base64-encoded-png-data"],
178 "text/plain" : ["multiline text data"],
175 "application/json": {
179 "image/png": ["base64-encoded-png-data"],
176 # JSON data is included as-is
180 "application/json": {
177 "json": "data",
181 # JSON data is included as-is
182 "json": "data",
183 },
178 },
184 },
179 "metadata" : {
185 "metadata" : {
180 "image/png": {
186 "image/png": {
@@ -192,7 +198,8 b' The metadata of these messages may be keyed by mime-type as well.'
192 .. versionchanged:: 4.0
198 .. versionchanged:: 4.0
193
199
194 mime-types are used for keys, instead of a combination of short names (``text``)
200 mime-types are used for keys, instead of a combination of short names (``text``)
195 and mime-types.
201 and mime-types, and are stored in a ``data`` key, rather than the top-level.
202 i.e. ``output.data['image/png']`` instead of ``output.png``.
196
203
197
204
198 execute_result
205 execute_result
@@ -207,12 +214,14 b' adding only a ``prompt_number`` field, which must be an integer.'
207
214
208 {
215 {
209 "output_type" : "execute_result",
216 "output_type" : "execute_result",
210 "prompt_number": 42,
217 "execute_result": 42,
211 "text/plain" : ["multiline text data"],
218 "data" : {
212 "image/png": ["base64-encoded-png-data"],
219 "text/plain" : ["multiline text data"],
213 "application/json": {
220 "image/png": ["base64-encoded-png-data"],
214 # JSON data is included as-is
221 "application/json": {
215 "json": "data",
222 # JSON data is included as-is
223 "json": "data",
224 },
216 },
225 },
217 "metadata" : {
226 "metadata" : {
218 "image/png": {
227 "image/png": {
@@ -226,6 +235,10 b' adding only a ``prompt_number`` field, which must be an integer.'
226
235
227 ``pyout`` renamed to ``execute_result``
236 ``pyout`` renamed to ``execute_result``
228
237
238 .. versionchanged:: 4.0
239
240 ``prompt_number`` renamed to ``execution_count``
241
229
242
230 error
243 error
231 *****
244 *****
General Comments 0
You need to be logged in to leave comments. Login now