Warning

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

Module: html.notebookapp

A tornado based IPython notebook server.

3 Classes

class IPython.html.notebookapp.NotebookWebApplication(ipython_app, kernel_manager, contents_manager, cluster_manager, session_manager, kernel_spec_manager, config_manager, log, base_url, default_url, settings_overrides, jinja_env_options)

Bases: tornado.web.Application

__init__(ipython_app, kernel_manager, contents_manager, cluster_manager, session_manager, kernel_spec_manager, config_manager, log, base_url, default_url, settings_overrides, jinja_env_options)
init_handlers(settings)

Load the (URL pattern, handler) tuples for each component.

class IPython.html.notebookapp.NbserverListApp(**kwargs)

Bases: IPython.core.application.BaseIPythonApplication

class IPython.html.notebookapp.NotebookApp(**kwargs)

Bases: IPython.core.application.BaseIPythonApplication

cleanup_kernels()

Shutdown all kernels.

The kernels will shutdown themselves when this process no longer exists, but explicit shutdown allows the KernelManagers to cleanup the connection files.

init_components()

Check the components submodule, and warn if it’s unclean

init_kernel_argv()

add the profile-dir to arguments to be passed to IPython kernels

init_server_extensions()

Load any extensions specified by config.

Import the module, then call the load_jupyter_server_extension function, if one exists.

The extension API is experimental, and may change in future releases.

init_webapp()

initialize tornado webapp and httpserver

nbextensions_path

The path to look for Javascript notebook extensions

notebook_info()

Return the current working directory and the server url information

remove_server_info_file()

Remove the nbserver-<pid>.json file created for this server.

Ignores the error raised when the file has already been removed.

server_info()

Return a JSONable dict of information about this server.

start()

Start the IPython Notebook server app, after initialization

This method takes no arguments so all configuration and initialization must be done prior to calling this method.

static_file_path

return extra paths + the default location

template_file_path

return extra paths + the default locations

write_server_info_file()

Write the result of server_info() to the JSON file info_file.

3 Functions

IPython.html.notebookapp.random_ports(port, n)

Generate a list of n random ports near the given port.

The first 5 ports will be sequential, and the remaining n-5 will be randomly selected in the range [port-2*n, port+2*n].

IPython.html.notebookapp.load_handlers(name)

Load the (URL pattern, handler) tuples for each component.

IPython.html.notebookapp.list_running_servers(profile='default')

Iterate over the server info files of running notebook servers.

Given a profile name, find nbserver-* files in the security directory of that profile, and yield dicts of their information, each one pertaining to a currently running notebook server instance.