跳转到主要内容

jupyterlab的笔记本模板

项目描述

支持jupyterlab中的jupyter笔记本模板

Build Status codecov PyPI PyPI npm FINOS Active Binder

安装

PyPI

jupyterlab_templatesPyPI上可用

pip install jupyterlab_templates

Conda

jupyterlab_templates还在conda-forge上可用

conda install -c conda-forge jupyterlab_templates

Jupyter服务器/JupyterLab扩展

jupyter labextension install jupyterlab_templates
jupyter server extension enable --py jupyterlab_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目录是默认父目录之一。因此,如果您想为用户安装教程或指南,只需将它们复制到notebook_templates目录中的jupyter数据文件夹内,例如,对于bqplot,请复制到/usr/local/share/jupyter/notebook_templates/bqplot

如果您想排除特定目录中的模板,请在该位置添加一个文件.jupyterlab_templates_ignore。此目录中的所有notebooks将被忽略(但不会影响子目录)。

标志

  • allowed_extensions:允许模板的扩展名列表。(可选,默认 ["*.ipynb"]
  • template_dirs:绝对目录路径列表。所有这些路径的任何子目录中与allowed_extensions匹配的文件将被列为模板
  • include_default:包含默认样本模板(默认 True)
  • include_core_paths:包含 jupyter 核心路径(见:jupyter --paths)(默认 True)
  • template_label:设置模板 UI 图标的标签(默认 "模板")

开发

有关指南,请参阅 CONTRIBUTING.md

许可证

本软件基于 Apache 2.0 许可协议。有关详细信息,请参阅 LICENSEAUTHORS 文件。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码发行版

jupyterlab_templates-0.5.2.tar.gz (313.6 kB 查看哈希值)

上传时间

构建发行版

jupyterlab_templates-0.5.2-py3-none-any.whl (148.5 kB 查看哈希值)

上传时间 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面