Warning
This documentation is for an old version of IPython. You can find docs for newer versions here.
Module: html.services.notebooks.filenbmanager
¶
A notebook manager that uses the local file system for storage.
Authors:
- Brian Granger
- Zach Sailer
1 Class¶
-
class
IPython.html.services.notebooks.filenbmanager.
FileNotebookManager
(**kwargs)¶ Bases:
IPython.html.services.notebooks.nbmanager.NotebookManager
-
create_checkpoint
(name, path='')¶ Create a checkpoint from the current state of a notebook
-
delete_checkpoint
(checkpoint_id, name, path='')¶ delete a notebook’s checkpoint
-
delete_notebook
(name, path='')¶ Delete notebook by name and path.
-
get_checkpoint_model
(checkpoint_id, name, path='')¶ construct the info dict for a given checkpoint
-
get_checkpoint_path
(checkpoint_id, name, path='')¶ find the path to a checkpoint
-
get_dir_model
(name, path='')¶ Get the directory model given a directory name and its API style path
-
get_notebook
(name, path='', content=True)¶ Takes a path and name for a notebook and returns its model
Parameters: name : str
the name of the notebook
path : str
the URL path that describes the relative path for the notebook
Returns: model : dict
the notebook model. If contents=True, returns the ‘contents’ dict in the model as well.
-
get_notebook_names
(path='')¶ List all notebook names in the notebook dir and path.
Does the API style path correspond to a hidden directory or file?
Parameters: path : string
The path to check. This is an API path (/ separated, relative to base notebook-dir).
Returns: exists : bool
Whether the path is hidden.
-
list_checkpoints
(name, path='')¶ list the checkpoints for a given notebook
This notebook manager currently only supports one checkpoint per notebook.
-
list_dirs
(path)¶ List the directories for a given API style path.
-
list_notebooks
(path)¶ Returns a list of dictionaries that are the standard model for all notebooks in the relative ‘path’.
Parameters: path : str
the URL path that describes the relative path for the listed notebooks
Returns: notebooks : list of dicts
a list of the notebook models without ‘content’
-
notebook_exists
(name, path='')¶ Returns a True if the notebook exists. Else, returns False.
Parameters: name : string
The name of the notebook you are checking.
path : string
The relative path to the notebook (with ‘/’ as separator)
Returns: bool
-
path_exists
(path)¶ Does the API-style path (directory) actually exist?
Parameters: path : string
The path to check. This is an API path (/ separated, relative to base notebook-dir).
Returns: exists : bool
Whether the path is indeed a directory.
-
rename_notebook
(old_name, old_path, new_name, new_path)¶ Rename a notebook.
-
restore_checkpoint
(checkpoint_id, name, path='')¶ restore a notebook to a checkpointed state
-
save_notebook
(model, name='', path='')¶ Save the notebook model and return the model with no content.
-
update_notebook
(model, name, path='')¶ Update the notebook’s path and/or name
-