The official API for working with notebooks in the current format version.
Authors:
Bases: exceptions.ValueError
Decorator for docstrings referring to classes/functions accessed through nbformat.current.
Put {nbformat_mod} in the docstring in place of ‘IPython.nbformat.v3’.
Parse a string into a (nbformat, string) tuple.
Read a JSON notebook from a string and return the NotebookNode object.
Read a .py notebook from a string and return the NotebookNode object.
Read a notebook from a string and return the NotebookNode object.
This function properly handles notebooks of any version. The notebook returned will always be in the current version’s format.
Parameters: | s : unicode
format : (u’json’, u’ipynb’, u’py’)
|
---|---|
Returns: | nb : NotebookNode
|
Write a notebook to a string in a given format in the current nbformat version.
This function always writes the notebook in the current nbformat version.
Parameters: | nb : NotebookNode
format : (u’json’, u’ipynb’, u’py’)
|
---|---|
Returns: | s : unicode
|
Read a notebook from a file and return the NotebookNode object.
This function properly handles notebooks of any version. The notebook returned will always be in the current version’s format.
Parameters: | fp : file
format : (u’json’, u’ipynb’, u’py’)
|
---|---|
Returns: | nb : NotebookNode
|
Write a notebook to a file in a given format in the current nbformat version.
This function always writes the notebook in the current nbformat version.
Parameters: | nb : NotebookNode
fp : file
format : (u’json’, u’ipynb’, u’py’)
|
---|---|
Returns: | s : unicode
|