Skip to main content

notebook templates for jupyterlab

Project description

Support for jupyter notebook templates in jupyterlab

Build Status codecov PyPI PyPI npm FINOS Active Binder

Install

PyPI

jupyterlab_templates is available on PyPI:

pip install jupyterlab_templates

Conda

jupyterlab_templates is also available on conda-forge:

conda install -c conda-forge jupyterlab_templates

Jupyter Server/JupyterLab Extension

jupyter labextension install jupyterlab_templates
jupyter server extension enable --py jupyterlab_templates

Adding templates

install the server extension, and add the following to jupyter_notebook_config.py

c.JupyterLabTemplates.allowed_extensions = ["*.ipynb"]
c.JupyterLabTemplates.template_dirs = ['list', 'of', 'template', 'directories']
c.JupyterLabTemplates.include_default = True
c.JupyterLabTemplates.include_core_paths = True
c.JupyterLabTemplates.template_label = "Template"

Templates for libraries

The extension will search subdirectories of each parent directory specified in template_dirs for templates. Note! Templates in the parent directories will be ignored. You must put the templates in subdirectories, in order to keep everything organized.

If include_default = True the notebook_templates directory under the jupyter data folder is one of the default parent directories. Thus, if you have tutorials or guides you'd like to install for users, simply copy them into your jupyter data folder inside the notebook_templates directory, e.g. /usr/local/share/jupyter/notebook_templates/bqplot for bqplot.

If you want to exclude templates from a specific directory, please add a file .jupyterlab_templates_ignore to to this location. All notebooks in this directory will be ignored (but has no effect on subdirectories).

Flags

  • allowed_extensions: a list of extensions to allow templates for. (optional, default ["*.ipynb"])
  • template_dirs: a list of absolute directory paths. All files matching allowed_extensions in any subdirectories of these paths will be listed as templates
  • include_default: include the default Sample template (default True)
  • include_core_paths: include jupyter core paths (see: jupyter --paths) (default True)
  • template_label: set label for template UI icon (default "Template")

Development

See CONTRIBUTING.md for guidelines.

License

This software is licensed under the Apache 2.0 license. See the LICENSE and AUTHORS files for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlab_templates-0.5.2.tar.gz (313.6 kB view details)

Uploaded Source

Built Distribution

jupyterlab_templates-0.5.2-py3-none-any.whl (148.5 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlab_templates-0.5.2.tar.gz.

File metadata

  • Download URL: jupyterlab_templates-0.5.2.tar.gz
  • Upload date:
  • Size: 313.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for jupyterlab_templates-0.5.2.tar.gz
Algorithm Hash digest
SHA256 7bea071f933a50879ac08b52414fac9c413c50d6919fceca393f0841c1a74510
MD5 1772fe232063610b6f1cf7eb5e9eb4f4
BLAKE2b-256 dfeb35962d28c685e6ce5e267339f49fd94e13e4c4fc921e04d828fdec1dcd38

See more details on using hashes here.

File details

Details for the file jupyterlab_templates-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlab_templates-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 125fe4da3d6034085dd4f5a4ee389204d50e1ecaf7e76e04168c1be52b7532b1
MD5 1cd2529f4cbed884c005d2012786ce92
BLAKE2b-256 71dad9d8ff8679ee0970e29c73f54f927de5ef485ef87605458ee18562eaa190

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page