jupyter和jupyterlab的笔记本模板
项目描述
支持jupyter和jupyterlab的笔记本模板
JupyterLab
Jupyter Notebook
安装
PyPI
jupyter-templates
在PyPI上有提供
pip install jupyter-templates
Conda
jupyter-templates
也在conda-forge上有提供
conda install -c conda-forge jupyter-templates
Jupyter服务器/JupyterLab扩展
jupyter-templates
作为一个预构建的扩展提供,因此JupyterLab中无需采取进一步操作。
要显式安装,运行
jupyter labextension install jupyter-templates
jupyter server extension enable --py jupyter_templates
对于经典笔记本,运行
jupyter nbclassic-extension enable jupyter_templates/extension
jupyter server extension enable --py jupyter_templates
添加模板
安装服务器扩展,并将以下内容添加到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"
库模板
该扩展将在template_dirs
中指定的每个父目录的子目录中搜索模板。**注意**!父目录中的模板将被忽略。您必须将模板放在子目录中,以便保持一切有序。
如果 include_default = True
,则位于 jupyter 数据文件夹 下的 notebook_templates
目录是默认父目录之一。因此,如果您想为用户安装教程或指南,只需将它们复制到您的 jupyter 数据文件夹中的 notebook_templates
目录中即可,例如 /usr/local/share/jupyter/notebook_templates/bqplot
用于 bqplot
。
如果您想排除特定目录中的模板,请在此位置添加一个名为 .jupyter_templates_ignore
的文件。此目录中的所有笔记本都将被忽略(但不会影响子目录)。
标志
allowed_extensions
:允许模板的扩展名列表。(可选,默认["*.ipynb"]
)template_dirs
:绝对目录路径列表。所有这些路径的任何 子目录 中匹配allowed_extensions
的文件都将被列为模板include_default
:包含默认示例模板(默认 True)include_core_paths
:包含 jupyter 核心路径(见:jupyter --paths)(默认 True)template_label
:设置模板 UI 图标的标签(默认 "模板")
本软件根据 Apache 2.0 许可证授权。有关详细信息,请参阅 LICENSE 文件。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源分布
jupyter_templates-0.1.1.tar.gz (302.5 kB 查看哈希值)
构建分布
jupyter_templates-0.1.1-py3-none-any.whl (150.8 kB 查看哈希值)
关闭
jupyter_templates-0.1.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a5359ed75b72dda1ce35cf87ab4c397e4606f8b9650527d812b9dbef22b5e455 |
|
MD5 | 53685e27f3a841825cebf996fbf35b63 |
|
BLAKE2b-256 | 69c9472bfb848c9adc1da2ac0ec05a8f1480bf7c222bf419650be12678d1a64b |
关闭
jupyter_templates-0.1.1-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | db21f4a069482cfa9761c03704b4f215c06d04ed0c15d750e0211864371c416d |
|
MD5 | 7170dc47b592b6e77f59805f41df64a7 |
|
BLAKE2b-256 | 9b727e2027e9baf519b30e3a138de5a75f7629aa549e2af98348c143a4d3ff06 |