Warning

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

Module: nbformat.v2.nbbase

The basic dict based notebook format.

The Python representation of a notebook is a nested structure of dictionary subclasses that support attribute access (IPython.utils.ipstruct.Struct). The functions in this module are merely helpers to build the structs in the right form.

Authors:

  • Brian Granger

1 Class

class IPython.nbformat.v2.nbbase.NotebookNode(*args, **kw)

Bases: IPython.utils.ipstruct.Struct

8 Functions

IPython.nbformat.v2.nbbase.from_dict(d)
IPython.nbformat.v2.nbbase.new_output(output_type=None, output_text=None, output_png=None, output_html=None, output_svg=None, output_latex=None, output_json=None, output_javascript=None, output_jpeg=None, prompt_number=None, etype=None, evalue=None, traceback=None)

Create a new code cell with input and output

IPython.nbformat.v2.nbbase.new_code_cell(input=None, prompt_number=None, outputs=None, language=u'python', collapsed=False)

Create a new code cell with input and output

IPython.nbformat.v2.nbbase.new_text_cell(cell_type, source=None, rendered=None)

Create a new text cell.

IPython.nbformat.v2.nbbase.new_worksheet(name=None, cells=None)

Create a worksheet by name with with a list of cells.

IPython.nbformat.v2.nbbase.new_notebook(metadata=None, worksheets=None)

Create a notebook by name, id and a list of worksheets.

IPython.nbformat.v2.nbbase.new_metadata(name=None, authors=None, license=None, created=None, modified=None, gistid=None)

Create a new metadata node.

IPython.nbformat.v2.nbbase.new_author(name=None, email=None, affiliation=None, url=None)

Create a new author.