This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: nbformat.v3

The main API for the v3 notebook format.


  • Brian Granger

1 Function


Parse a notebook filename.

This function takes a notebook filename and returns the notebook format (json/py) and the notebook name. This logic can be summarized as follows:

  • notebook.ipynb -> (notebook.ipynb, notebook, json)
  • notebook.json -> (notebook.json, notebook, json)
  • notebook.py -> (notebook.py, notebook, py)
  • notebook -> (notebook.ipynb, notebook, json)

fname : unicode

The notebook filename. The filename can use a specific filename extention (.ipynb, .json, .py) or none, in which case .ipynb will be assumed.


(fname, name, format) : (unicode, unicode, unicode)

The filename, notebook name and format.