Day 2 - rst

Jonathan Frederic 11 years ago
parent af5fbc5fc9
commit bc2a2ecde2

@ -289,5 +289,8 @@ texinfo_documents = [
#texinfo_no_detailmenu = False
intersphinx_mapping = {
'ipython': ('http://ipython.org/ipython-doc/dev/', None)
'ipython': ('http://ipython.org/ipython-doc/dev/', None),
'ipykernel': ('http://ipython.org/ipykernel-doc/dev/', None),
'nbconvert': ('http://jupyter.org/nbconvert-doc/dev/', None),
'nbformat': ('http://jupyter.org/nbformat-doc/dev/', None)
}

@ -0,0 +1,307 @@
.. _config:
Config
======
The notebook server can be run with a variety of command line arguments.
A list of available options can be found below in the :ref:`options section
<options>`.
Defaults for these options can also be set by creating a file named
``jupyter_notebook_config.py`` in your Jupyter *profile folder*. The profile
folder is a subfolder of your Jupyter directory; to find out where it is
located, run::
$ jupyter locate
To create a new set of default configuration files, with lots of information
on available options, use::
$ jupyter profile create
.. seealso::
:ref:`public_server`
.. _options:
Options
-------
This list of options can be generated by running the following and hitting
enter::
$ jupyter notebook --help
NotebookApp.allow_credentials : Bool
Default: ``False``
Set the Access-Control-Allow-Credentials: true header
NotebookApp.allow_origin : Unicode
Default: ``''``
Set the Access-Control-Allow-Origin header
Use '*' to allow any origin to access your server.
Takes precedence over allow_origin_pat.
NotebookApp.allow_origin_pat : Unicode
Default: ``''``
Use a regular expression for the Access-Control-Allow-Origin header
Requests from an origin matching the expression will get replies with:
Access-Control-Allow-Origin: origin
where `origin` is the origin of the request.
Ignored if allow_origin is set.
NotebookApp.base_project_url : Unicode
Default: ``'/'``
DEPRECATED use base_url
NotebookApp.base_url : Unicode
Default: ``'/'``
The base URL for the notebook server.
Leading and trailing slashes can be omitted,
and will automatically be added.
NotebookApp.browser : Unicode
Default: ``''``
Specify what command to use to invoke a web
browser when opening the notebook. If not specified, the
default browser will be determined by the `webbrowser`
standard library module, which allows setting of the
BROWSER environment variable to override it.
NotebookApp.certfile : Unicode
Default: ``''``
The full path to an SSL/TLS certificate file.
NotebookApp.cluster_manager_class : Type
Default: ``<class 'notebook.services.clusters.clustermanager.ClusterMana...``
The cluster manager class to use.
NotebookApp.config_manager_class : Type
Default: ``<class 'notebook.services.config.manager.ConfigManager'>``
The config manager class to use
NotebookApp.contents_manager_class : Type
Default: ``<class 'notebook.services.contents.filemanager.FileContentsMa...``
The notebook manager class to use.
NotebookApp.cookie_secret : Bytes
Default: ``b''``
The random bytes used to secure cookies.
By default this is a new random number every time you start the Notebook.
Set it to a value in a config file to enable logins to persist across server sessions.
Note: Cookie secrets should be kept private, do not share config files with
cookie_secret stored in plaintext (you can read the value from a file).
NotebookApp.cookie_secret_file : Unicode
Default: ``''``
The file where the cookie secret is stored.
NotebookApp.default_url : Unicode
Default: ``'/tree'``
The default URL to redirect to from `/`
NotebookApp.enable_mathjax : Bool
Default: ``True``
Whether to enable MathJax for typesetting math/TeX
MathJax is the javascript library IPython uses to render math/LaTeX. It is
very large, so you may want to disable it if you have a slow internet
connection, or for offline use of the notebook.
When disabled, equations etc. will appear as their untransformed TeX source.
NotebookApp.extra_nbextensions_path : List
Default: ``[]``
extra paths to look for Javascript notebook extensions
NotebookApp.extra_static_paths : List
Default: ``[]``
Extra paths to search for serving static files.
This allows adding javascript/css to be available from the notebook server machine,
or overriding individual files in the IPython
NotebookApp.extra_template_paths : List
Default: ``[]``
Extra paths to search for serving jinja templates.
Can be used to override templates from notebook.templates.
NotebookApp.file_to_run : Unicode
Default: ``''``
No description
NotebookApp.ip : Unicode
Default: ``'localhost'``
The IP address the notebook server will listen on.
NotebookApp.jinja_environment_options : Dict
Default: ``{}``
Supply extra arguments that will be passed to Jinja environment.
NotebookApp.jinja_template_vars : Dict
Default: ``{}``
Extra variables to supply to jinja templates when rendering.
NotebookApp.kernel_manager_class : Type
Default: ``<class 'notebook.services.kernels.kernelmanager.MappingKernel...``
The kernel manager class to use.
NotebookApp.kernel_spec_manager_class : Type
Default: ``<class 'jupyter_client.kernelspec.KernelSpecManager'>``
The kernel spec manager class to use. Should be a subclass
of `jupyter_client.kernelspec.KernelSpecManager`.
The Api of KernelSpecManager is provisional and might change
without warning between this version of IPython and the next stable one.
NotebookApp.keyfile : Unicode
Default: ``''``
The full path to a private key file for usage with SSL/TLS.
NotebookApp.login_handler_class : Type
Default: ``<class 'notebook.auth.login.LoginHandler'>``
The login handler class to use.
NotebookApp.logout_handler_class : Type
Default: ``<class 'notebook.auth.logout.LogoutHandler'>``
The logout handler class to use.
NotebookApp.mathjax_url : Unicode
Default: ``''``
The url for MathJax.js.
NotebookApp.notebook_dir : Unicode
Default: ``''``
The directory to use for notebooks and kernels.
NotebookApp.open_browser : Bool
Default: ``True``
Whether to open in a browser after starting.
The specific browser used is platform dependent and
determined by the python standard library `webbrowser`
module, unless it is overridden using the --browser
(NotebookApp.browser) configuration option.
NotebookApp.password : Unicode
Default: ``''``
Hashed password to use for web authentication.
To generate, type in a python/IPython shell:
from notebook.auth import passwd; passwd()
The string should be of the form type:salt:hashed-password.
NotebookApp.port : Int
Default: ``8888``
The port the notebook server will listen on.
NotebookApp.port_retries : Int
Default: ``50``
The number of additional ports to try if the specified port is not available.
NotebookApp.pylab : Unicode
Default: ``'disabled'``
DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
NotebookApp.reraise_server_extension_failures : Bool
Default: ``False``
Reraise exceptions encountered loading server extensions?
NotebookApp.server_extensions : List
Default: ``[]``
Python modules to load as notebook server extensions. This is an experimental API, and may change in future releases.
NotebookApp.session_manager_class : Type
Default: ``<class 'notebook.services.sessions.sessionmanager.SessionMana...``
The session manager class to use.
NotebookApp.ssl_options : Dict
Default: ``{}``
Supply SSL options for the tornado HTTPServer.
See the tornado docs for details.
NotebookApp.tornado_settings : Dict
Default: ``{}``
Supply overrides for the tornado.web.Application that the IPython notebook uses.
NotebookApp.trust_xheaders : Bool
Default: ``False``
Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headerssent by the upstream reverse proxy. Necessary if the proxy handles SSL
NotebookApp.webapp_settings : Dict
Default: ``{}``
DEPRECATED, use tornado_settings
NotebookApp.websocket_url : Unicode
Default: ``''``
The base URL for websockets,
if it differs from the HTTP server (hint: it almost certainly doesn't).
Should be in the form of an HTTP origin: ws[s]://hostname[:port]

@ -6,6 +6,7 @@ The Jupyter notebook
:maxdepth: 2
notebook
config
public_server
security
development

@ -365,33 +365,6 @@ Specific plotting library integration is a feature of the kernel. See the
:ref:`plotting document <ipykernel:plotting>` of the IPython kernel for more
information.
Configuring the Jupyter Notebook
--------------------------------
The notebook server can be run with a variety of command line arguments.
To see a list of available options enter::
$ jupyter notebook --help
Defaults for these options can also be set by creating a file named
``ipython_notebook_config.py`` in your Jupyter *profile folder*. The profile
folder is a subfolder of your Jupyter directory; to find out where it is
located, run::
$ jupyter locate
To create a new set of default configuration files, with lots of information
on available options, use::
$ jupyter profile create
.. seealso::
:ref:`config_overview`, in particular :ref:`Profiles`.
:ref:`notebook_server_security`
:ref:`notebook_public_server`
Installing kernels
------------------

@ -40,7 +40,7 @@ hashed password using the function :func:`IPython.lib.security.passwd`:
argument. **Do not** pass it as an argument inside an IPython session, as it
will be saved in your input history.
You can then add this to your :file:`ipython_notebook_config.py`, e.g.::
You can then add this to your :file:`jupyter_notebook_config.py`, e.g.::
# Password to use for web authentication
c = get_config()
@ -90,7 +90,7 @@ command line, type::
$ ipython profile create nbserver
In the profile directory just created, edit the file
``ipython_notebook_config.py``. By default, the file has all fields
``jupyter_notebook_config.py``. By default, the file has all fields
commented; the minimum set you need to uncomment and edit is the following::
c = get_config()
@ -128,7 +128,7 @@ of the notebooks in your working directory) typically lives at the URL
rest of the notebook, under a sub-directory,
e.g. ``http://localhost:8888/ipython/``, you can do so with
configuration options like the following (see above for instructions about
modifying ``ipython_notebook_config.py``)::
modifying ``jupyter_notebook_config.py``)::
c.NotebookApp.base_url = '/ipython/'
c.NotebookApp.webapp_settings = {'static_url_prefix':'/ipython/static/'}

@ -47,7 +47,7 @@ This signature is a digest of the notebooks contents plus a secret key,
known only to the user. The secret key is a user-only readable file in
the Jupyter profile's security directory. By default, this is::
~/.ipython/profile_default/security/notebook_secret
~/.jupyter/profile_default/security/notebook_secret
.. note::

Loading…
Cancel
Save