nbless package

Module contents

nbless.nbless(filenames: List[str], kernel: str = 'python3') → nbformat.notebooknode.NotebookNode[source]

Create a Jupyter notebook from text files and Python or R scripts

Parameters:filenames – a list of source file names
nbless.nbuild(filenames: List[str]) → nbformat.notebooknode.NotebookNode[source]

Create a Jupyter notebook from text files and Python or R scripts

Parameters:filenames – a list of source file names
nbless.nbexec(nb_name: str, kernel: str = 'python3') → Tuple[str, nbformat.notebooknode.NotebookNode][source]

Create an executed notebook without modifying the input notebook.

Parameters:nb_name – The name of the input notebook
nbless.nbconv(nb_name: str, exporter: str = 'python') → Tuple[str, str][source]

Convert a notebook into various formats using different exporters

Parameters:
  • input_name – The name of the input notebook
  • exporter – The exporter type determines the output file type
Note:

The exporter type must be ‘asciidoc’, ‘pdf’, ‘html’, ‘latex’, ‘markdown’, ‘python’, ‘rst’, ‘script’, or ‘slides’. pdf requires latex, ‘notebook’ does nothing, slides need to served (not self-contained)

nbless.nbsave(nb_name: str, nb: nbformat.notebooknode.NotebookNode) → None[source]
nbless.nbread(filename: str) → nbformat.notebooknode.NotebookNode[source]