A base class notebook manager.
Authors:
Bases: IPython.config.configurable.LoggingConfigurable
Check for trusted cells, and sign the notebook.
Called as a part of saving notebooks.
Parameters: | nb : dict
name : string
path : string
|
---|
Copy an existing notebook and return its new model.
If to_name not specified, increment from_name-Copy#.ipynb.
Create a checkpoint of the current state of a notebook
Returns a checkpoint_id for the new checkpoint.
Create a new notebook and return its model with no content.
delete a checkpoint for a notebook
Delete notebook by name and path.
Get the directory model given a directory name and its API style path.
The keys in the model should be: * name * path * last_modified * created * type=’directory’
Get the notebook model with or without content.
Increment a notebook filename without the .ipynb to make it unique.
Parameters: | basename : unicode
path : unicode
|
---|---|
Returns: | name : unicode
|
Does the API style path correspond to a hidden directory or file?
Parameters: | path : string
|
---|---|
Returns: | exists : bool
|
Return a list of checkpoints for a given notebook
List the directory models for a given API style path.
Return a list of notebook dicts without content.
This returns a list of dicts, each of the form:
dict(notebook_id=notebook,name=name)
This list of dicts should be sorted by name:
data = sorted(data, key=lambda item: item['name'])
Mark cells as trusted if the notebook signature matches.
Called as a part of loading notebooks.
Parameters: | nb : dict
name : string
path : string
|
---|
Returns a True if the notebook exists. Else, returns False.
Parameters: | name : string
path : string
|
---|---|
Returns: | bool : |
Does the API-style path (directory) actually exist?
Override this method in subclasses.
Parameters: | path : string
|
---|---|
Returns: | exists : bool
|
Restore a notebook from one of its checkpoints
Save the notebook and return the model with no content.
Should this file/directory name be displayed in a listing?
Explicitly trust a notebook
Parameters: | name : string
path : string
|
---|
Update the notebook and return the model with no content.