A collection of various notebook extensions for Jupyter
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
The IPython-contrib repository is maintained independently by a group of users and developers and not officially related to the IPython development team.
For Jupyter version 4 or 5, use the master branch of the repository. Most nbextensions have been updated to work with both Jupyter 4.x and 5.x, but occasionally things get missed, or the Jupyter API changes in a minor version update, so if anything doesn't work as you'd expect/hope, please do check the issues, or open a new one as necessary!
This repo is pretty much all in the main master branch, although there remain vestigial branches for IPython notebook versions 2.x and 3.x.
Due to major differences between the Jupyter Notebook and JupyterLab, the extensions in this repository will not work in JupyterLab.
Documentation for all maintained extensions can be found at jupyter-contrib-nbextensions.readthedocs.io
All extensions that are maintained and active have at least a yaml file to allow them being configured using the jupyternbextensionsconfigurator server extension, which is installed as a dependency of this package. Most also have a markdown readme file for documentation. The
jupyter_nbextensions_configuratorserver extension shows an nbextensions tab on the main notebook dashboard (file tree page) from which you can see each nbextension's markdown readme, and configure its options. To view documentation without installing, you can check the list at jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions.html, or browse the nbextensions directory to read markdown readmes on github at github.com/ipython-contrib/jupytercontribnbextensions/tree/master/src/jupytercontribnbextensions/nbextensions.
Some extensions are not documented. We encourage you to add documentation for them.
To install the
jupyter_contrib_nbextensionsnotebook extensions, three steps are required. First, the Python pip package needs to be installed. Then, the notebook extensions themselves need to be copied to the Jupyter data directory. Finally, the installed notebook extensions can be enabled, either by using built-in Jupyter commands, or more conveniently by using the jupyternbextensionsconfigurator server extension, which is installed as a dependency of this repo.
The Python package installation step is necessary to allow painless installation of the nbextensions together with additional items like nbconvert templates, pre-/postprocessors, and exporters.
All of the nbextensions in this repo are provided as parts of a python package, which is installable in the usual manner, using
setup.pyscript. To install the current version from PyPi, simply type
pip install jupyter_contrib_nbextensions
Alternatively, you can install directly from the current master branch of the repository
pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
All the usual pip options apply, e.g. using pip's
--upgradeflag to force an upgrade, or
-efor an editable install.
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter contrib nbextension install --sys-prefix), so the second installation step below can therefore be skipped.
You can also install from a cloned repo, which can be useful for development. You can clone the repo using
git clone https://github.com/ipython-contrib/jupyter_contrib_nbextensions.git
Then perform an editable pip install using
pip install -e jupyter_contrib_nbextensions
jupytersubcommand is provided for the purpose:
jupyter contrib nbextension install --user
The command does two things: installs nbextension files, and edits nbconvert config files. The first part is essentially a wrapper around the notebook-provided
jupyter_notebook_config.jsonas noted below in the options. The command can take most of the same options as the jupyter-provided versions, including
--userto install into the user's home jupyter directories
--systemto perform installation into system-wide jupyter directories
--sys-prefixto install into python's
sys.prefix, useful for instance in virtual environments, such as with conda
--symlinkto symlink the nbextensions rather than copying each file (recommended, on non-Windows platforms).
--debug, for more-verbose output
In addition, two further option flags are provided to perform either only the config-editing operations, or only the file-copy operations:
--only-filesto install nbextension files without editing any config files
--only-configto edit the config files without copying/symlinking any nbextension files. This edits the following files in the applicable jupyter config directory:
jupyter_nbconvert_config.jsonto use some of the classes provided in the python module
jupyter_notebook_config.jsonto enable the serverextension
--perform-running-checkoption flag is provided in order to prevent the installation from proceeding if a notebook server appears to be currently running (by default, the install will still be performed, even if a notebook server appears to be running).
uninstallcommand is also provided, to remove all of the nbextension files from the jupyter directories.
To use an nbextension, you'll also need to enable it, which tells the notebook interface to load it. To do this, you can use a Jupyter subcommand:
jupyter nbextension enable
jupyter nbextension enable codefolding/main
To disable the extension again, use
jupyter nbextension disable
Alternatively, and more conveniently, you can use the jupyternbextensionsconfigurator server extension, which is installed as a dependency of this repo, and can be used to enable and disable the individual nbextensions, as well as configure their options. You can then open the
nbextensionstab on the tree (dashboard/file browser) notebook page to configure nbextensions. You will have access there to a dashboard where extensions can be enabled/disabled via checkboxes. Additionally a short documentation for each extension is displayed, and configuration options are presented.
See also installing Jupyter
Each notebook extension typically has its own directory named after the extension, containing:
thisextension/thisextension.yml- file describing the nbextension to the
thisextension/README.md- readme file describing the nbextension in markdown format
A few (jupyterhighlightselectedword, jupyterlatex_envs), exist as separate packages on pypi, which are included as dependencies of this package.
For further details, see the documentation at jupyter-contrib-nbextensions.readthedocs.io.
To learn how to setup a development environment and for contribution guidelines, see CONTRIBUTING.md.
For changes, see the CHANGELOG.md