Public API

Convert Jupyter Notebooks to Python Scripts.

Functions:

convert_notebook(nb_file, outfile)

Convert a notebook to a Python file.

process_multiple_notebooks(notebooks, outdir)

Process multiple Jupyter notebooks for conversion into Python scripts.

reformat_file(filename, yapf_style, …)

Reformat the given file.

convert_notebook(nb_file, outfile)[source]

Convert a notebook to a Python file.

Parameters
process_multiple_notebooks(notebooks, outdir, overwrite=False)[source]

Process multiple Jupyter notebooks for conversion into Python scripts.

Parameters
Return type

int

reformat_file(filename, yapf_style, isort_config_file)[source]

Reformat the given file.

Parameters
  • filename (Union[str, Path, PathLike])

  • yapf_style (str) – The name of the yapf style, or the path to the yapf style file.

  • isort_config_file (str) – The filename of the isort configuration file.

Return type

int