IPython Documentation

Table Of Contents

Previous topic

Module: html.auth.logout

Next topic

Module: html.base.zmqhandlers

This Page


This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: html.base.handlers

Base Tornado handlers for the notebook.


  • Brian Granger

5 Classes

class IPython.html.base.handlers.RequestHandler(application, request, **kwargs)

Bases: tornado.web.RequestHandler

RequestHandler with default variable setting.

class IPython.html.base.handlers.AuthenticatedHandler(application, request, **kwargs)

Bases: IPython.html.base.handlers.RequestHandler

A RequestHandler with an authenticated user.


Is a user currently logged in?


May a user proceed to log in?

This returns True if login capability is available, irrespective of whether the user is already logged in or not.


our password

class IPython.html.base.handlers.IPythonHandler(application, request, **kwargs)

Bases: IPython.html.base.handlers.AuthenticatedHandler

IPython-specific extensions to authenticated handling

Mostly property shortcuts to IPython-specific settings.


Return the jinja template object for a given name


use the IPython log by default, falling back on tornado’s logger


Use less instead of css in templates


websocket url matching the current request

By default, this is just ‘’, indicating that it should match the same host, protocol, port, etc.

class IPython.html.base.handlers.AuthenticatedFileHandler(application, request, **kwargs)

Bases: IPython.html.base.handlers.IPythonHandler, tornado.web.StaticFileHandler

static files should only be accessible when logged in

class IPython.html.base.handlers.FileFindHandler(application, request, **kwargs)

Bases: tornado.web.StaticFileHandler

subclass of StaticFileHandler for serving files from a search path

classmethod get_version(settings, path)

Generate the version string to be used in static URLs.

This method may be overridden in subclasses (but note that it is a class method rather than a static method). The default implementation uses a hash of the file’s contents.

settings is the Application.settings dictionary and path is the relative location of the requested asset on the filesystem. The returned value should be a string, or None if no version could be determined.

classmethod locate_file(path, roots)

locate a file to serve on our static file search path


Converts a static URL path into a filesystem path.

url_path is the path component of the URL with static_url_prefix removed. The return value should be filesystem path relative to static_path.