[IPython-dev] NotebookManager API

Konrad Hinsen konrad.hinsen at fastmail.net
Tue Jan 28 10:14:38 EST 2014


I am working on my NotebookManager, using IPython.html.services.notebooks.nbmanager,
IPython.html.services.notebooks.filenbmanager, and the "bookstore" plugin
as a guidance. However, my NotebookManager differs in one fundamental aspect:
its backing store is not a filesystem, meaning there are no filenames and in
particular no extensions.

Is there any documentation for the NotebookManager API that is more
precise than the existing implementations? I wonder in particular
about the rules for the "path" and "name" arguments of the various
methods. One problem I am fighting with is that my get_notebook_model
gets called sometimes with the notebook names that I return in
list_notebooks, but sometimes with the names suffixed with ".ipynb". I
also see calls to list_notebooks with values of "path" that don't
satisfy my path_exists test.

Inspecting the source code, I wonder what the distinction between the
classes NotebookManager and FileNotebookManager is. The names suggest
that FileNotebookManager is specific to a filesystem-based manager,
whereas NotebookManager is generic, but NotebookManager already
contains calls to os.path. I am writing my own manager as a subclass
of NotebookManager, but perhaps I shouldn't.

Konrad.



More information about the IPython-dev mailing list