How to use the nbclient.execute function in nbclient

To help you get started, we’ve selected a few nbclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github choldgraf / nbclean / nbclean / run.py View on Github external
Parameters
    ----------
    ntbk : string | instance of NotebookNode
        The input notebook.
    max_output_lines : int | None
        The maximum number of lines allowed in notebook outputs.
    """
    if isinstance(ntbk, (str, type(Path))):
        ntbk = Path(ntbk)
        wd = str(ntbk.parent)
        ntbk = str(ntbk)
    else:
        wd = str(Path())
    ntbk = _check_nb_file(ntbk)
    ntbk = execute(ntbk, cwd=wd)
    return ntbk

nbclient

A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor.

BSD-3-Clause
Latest version published 8 months ago

Package Health Score

91 / 100
Full package analysis

Popular nbclient functions

Similar packages