Skip to main content

Support for notebook templates in jupyter and jupyterlab

Build Status codecov PyPI PyPI npm Binder

JupyterLab

Jupyter Notebook

Install

PyPI

jupyter-templates is available on PyPI:

pip install jupyter-templates

Conda

jupyter-templates is also available on conda-forge:

conda install -c conda-forge jupyter-templates

Jupyter Server/JupyterLab Extension

jupyter-templates is available as a prebuilt extension, so no further action should be necessary in JupyterLab.

To install it explicitly, run:

jupyter labextension install jupyter-templates
jupyter server extension enable --py jupyter_templates

For classic Notebook, run:

jupyter nbclassic-extension enable jupyter_templates/extension
jupyter server extension enable --py jupyter_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 .jupyter_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")

This software is licensed under the Apache 2.0 license. See the LICENSE file for details.

Metadata

Release files for jupyter-templates 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyter-templates 0.1.1
File Size Uploaded Provenance Actions
jupyter_templates-0.1.1.tar.gz 302.5 kB Without provenance Details for jupyter_templates-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-templates 0.1.1
File Interpreter ABI Platform Actions
jupyter_templates-0.1.1-py3-none-any.whl Python 3 none any Details for jupyter_templates-0.1.1-py3-none-any.whl

Total release size: 453.2 kB

Release files / jupyter_templates-0.1.1.tar.gz

Download URL jupyter_templates-0.1.1.tar.gz
Size 302.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a5359ed75b72dda1ce35cf87ab4c397e4606f8b9650527d812b9dbef22b5e455
BLAKE2b-256 checksum
How to use checksums
69c9472bfb848c9adc1da2ac0ec05a8f1480bf7c222bf419650be12678d1a64b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / jupyter_templates-0.1.1-py3-none-any.whl

Download URL jupyter_templates-0.1.1-py3-none-any.whl
Size 150.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db21f4a069482cfa9761c03704b4f215c06d04ed0c15d750e0211864371c416d
BLAKE2b-256 checksum
How to use checksums
9b727e2027e9baf519b30e3a138de5a75f7629aa549e2af98348c143a4d3ff06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Security for jupyter-templates 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page