Skip to content

IPEP 17: Notebook Format 4

Min RK edited this page Aug 30, 2013 · 8 revisions
Status Active
Author Min RK <benjaminrk@gmail.com>
Created April 29, 2013
Updated May 14, 2013

There are a few changes we need to make to the notebook that will not be backward compatible. We do not intend to make these changes for 1.0, because nbformat changes are quite painful. This is a catalog of the changes we intend to make when we do next rev the nbformat.

remove multiple worksheets

The worksheets field is a list, but we have no UI to support multiple worksheets. Our design has since shifted to heading-cell based structure, so we never intend to support the multiple worksheet model. The worksheets list of lists shall be replaced with a single list, called cells.

use mime-type output keys

We transform mimetype output data to short names, like json or png. These should be restored to proper mimetype values of image/png and application/json, etc. used by the message spec. The output should be generated by a simple passthrough of the messages, rather than a whitelist transform.

Remove python-centric names

Following IPEP 13, Python-specific keys in the message spec and notebook will be removed. Those affecting the notebook format:

  • pyout will become execute_output
  • pyerr will become error

Make cell content key uniform

Currently text cells have a source key, which contains the text, and code cells have an input key. There is no reason for the two cell types to have a different name for their content:

  • CodeCell.input will become CodeCell.source, matching TextCell.source.

metadata changes

  • remove notebook name from metadata
  • move language key from code cells to top-level notebook metadata
  • add kernel info to top-level notebook metadata in some form
  • add format key to raw_cell metadata

Clone this wiki locally