### Navigation

- index
- modules |
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »

# Module: `html.services.notebooks.handlers`

Tornado handlers for the notebooks web service.

Authors:

- Brian Granger

## 3 Classes

class `IPython.html.services.notebooks.handlers.``NotebookHandler`(application, request, **kwargs)

  Bases: `IPython.html.base.handlers.IPythonHandler`

  `delete`(*args, **kwargs)

    delete the notebook in the given notebook path

  `get`(*args, **kwargs)

    Return a Notebook or list of notebooks.

    - GET with path and no notebook name lists notebooks in a directory
    - GET with path and notebook name returns notebook JSON
  `notebook_location`(name, path='')

    Return the full URL location of a notebook based.

    Parameters :

    name : unicode

    > The base name of the notebook, such as “foo.ipynb”.

    path : unicode

    > The URL path of the notebook.

  `patch`(*args, **kwargs)

    PATCH renames a notebook without re-uploading content.

  `post`(*args, **kwargs)

    Create a new notebook in the specified path.

    POST creates new notebooks. The server always decides on the notebook name.

    POST /api/notebooks/path
      New untitled notebook in path. If content specified, upload a notebook, otherwise start empty.
    POST /api/notebooks/path?copy=OtherNotebook.ipynb
      New copy of OtherNotebook in path
  `put`(*args, **kwargs)

    Saves the notebook in the location specified by name and path.

    PUT is very similar to POST, but the requester specifies the name, whereas with POST, the server picks the name.

    PUT /api/notebooks/path/Name.ipynb
      Save notebook at `path/Name.ipynb`. Notebook structure is specified in content key of JSON request body. If content is not specified, create a new empty notebook.
    PUT /api/notebooks/path/Name.ipynb?copy=OtherNotebook.ipynb
      Copy OtherNotebook to Name

class `IPython.html.services.notebooks.handlers.``NotebookCheckpointsHandler`(application, request, **kwargs)

  Bases: `IPython.html.base.handlers.IPythonHandler`

  `get`(*args, **kwargs)

    get lists checkpoints for a notebook

  `post`(*args, **kwargs)

    post creates a new checkpoint

class `IPython.html.services.notebooks.handlers.``ModifyNotebookCheckpointsHandler`(application, request, **kwargs)

  Bases: `IPython.html.base.handlers.IPythonHandler`

  `delete`(*args, **kwargs)

    delete clears a checkpoint for a given notebook

  `post`(*args, **kwargs)

    post restores a notebook from a checkpoint

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- home|
- search|
- documentation »
- The IPython API »