AST Nodes

AST Nodes

AST nodes to designate notebook components.

class myst_nb.nodes.CellNode(rawsource='', *children, **attributes)[source]

Bases: docutils.nodes.container

Represent a cell in the Sphinx AST.

class myst_nb.nodes.CellInputNode(rawsource='', *children, **attributes)[source]

Bases: docutils.nodes.container

Represent an input cell in the Sphinx AST.

class myst_nb.nodes.CellOutputNode(rawsource='', *children, **attributes)[source]

Bases: docutils.nodes.container

Represent an output cell in the Sphinx AST.

class myst_nb.nodes.CellOutputBundleNode(outputs, renderer: str, metadata=None, **attributes)[source]

Bases: docutils.nodes.container

Represent a MimeBundle in the Sphinx AST, to be transformed later.

copy()[source]

monkey-patch Element.copy to copy the rawsource and line for docutils-0.16 or older versions.

refs: https://sourceforge.net/p/docutils/patches/165/

property metadata: nbformat.notebooknode.NotebookNode

The cell level metadata for this output.

property outputs: List[nbformat.notebooknode.NotebookNode]

The outputs associated with this cell.

property renderer: str

The renderer for this output cell.