How to use nbclient - 3 common examples

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 slinger360 / NineRiFt-Lite / main.py View on Github external
def initialize(self):
        self.root_folder = self.user_data_dir
        self.cache_folder = os.path.join(self.root_folder, 'cache')

        if not os.path.exists(self.cache_folder):
            os.makedirs(self.cache_folder)

        self.conn = Client()
        self.conn.bind(on_error=lambda a,b: tprint(b))

        self.com = Command(self.conn)
        self.fwupd = FWUpd(self.conn)
        self.fwget = FWGet(self.cache_folder)

        self.versel = BooleanProperty(False)
        self.hasextbms = BooleanProperty(False)
        tprint("Don't forget to post a review on the Play Store")
github slinger360 / NineRiFt-Lite / nbclient.py View on Github external
def __init__(self):
        self.register_event_type('on_error')
        super(Client, self).__init__()
        self.loop = None
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 6 days ago

Package Health Score

94 / 100
Full package analysis

Popular nbclient functions

Similar packages