A copier template for creating a JupyterLab extension. Four kinds of extension are supported:
With pip
:
pip install "copier~=9.2" jinja2-time
Or with conda
/ mamba
:
conda install -c conda-forge "copier>=9.2,<10" jinja2-time
mkdir myextension
cd myextension
copier copy --trust https://github.com/jupyterlab/extension-template .
If you are using Visual Studio Code, you may be interested in the configuration template for JupyterLab extension.
If you'd like to generate an extension for a older release, use the --vcs-ref
option and give a tag or commit from this repository.
copier copy --vcs-ref v4.0.0 --trust https://github.com/jupyterlab/extension-template .
If you are looking for a template compatible with JupyterLab version prior to 4.0.0, look at the cookiecutter template or the mimerenderer template.
This only works with an older version of the copier template. It does not work with an extension generated using the cookiecutter template. In that case, you could try the script
python -m jupyterlab.upgrade_extension
.
Extension generated from the copier template can be updated with a newer version of the template by executing the command:
copier update --trust
Your new extension includes a very simple example of a working extension. Use this example as a guide to build your own extension. Have a look at the extension examples repository for more information on various JupyterLab features.