跳转到主要内容

一个用于在Jupyter中渲染Bokeh内容的Jupyter扩展。

项目描述

jupyter_bokeh

Github Actions Status

jupyter_bokeh 是一个Jupyter扩展,用于在Jupyter中渲染 Bokeh 内容。有关在Bokeh应用程序中使用Jupyter小部件/ipywidgets对象的单独 ipywidgets_bokeh 库的支持,请参阅。

安装

对于JupyterLab 3.0及更高版本,您可以选择使用 pipconda 安装 jupyter_bokeh

pip install jupyter_bokeh

conda install -c conda-forge jupyter_bokeh

对于小于3.0版本的Jupyter Lab,您必须单独安装labextension

conda install -c conda-forge jupyter_bokeh
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install @bokeh/jupyter_bokeh

安装特定版本

jupyter labextension install @bokeh/jupyter_bokeh@x.y.x

兼容性

核心库 Bokeh 通常与 JupyterLab 的版本无关,并且与 jupyter_bokeh 扩展兼容,版本为 bokeh>=2.0.0

我们的目标是使 jupyter_bokeh 的次要版本(使用 SemVer 模式)跟随 JupyterLab 的次要版本更新,而微版本则是为新的 jupyter_bokeh 功能或错误修复版本。我们之前在使扩展次要版本更新跟踪 JupyterLab 的版本方面不一致,因此希望找到与他们的 JupyterLab 安装兼容的扩展版本的用户可以参考下表。

兼容的 JupyterLab 和 jupyter_bokeh 版本
JupyterLab jupyter_bokeh
0.34.x 0.6.2
0.35.x 0.6.3
1.0.x 1.0.0
2.0.x 2.0.0
3.0.x 3.0.0
4.0.x 4.0.0

贡献

开发安装

注意:您需要 NodeJS 来构建扩展包。

jlpm 命令是 JupyterLab 安装时附带的 yarn 固定版本。您可以使用 yarnnpm 替代下面的 jlpm

# Clone the repo to your local environment
# Change directory to the jupyter_bokeh directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build

您可以在不同的终端中同时监视源目录并运行 JupyterLab,以监视扩展源代码的变化并自动重新构建扩展。

# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab

在监视命令运行时,每次保存的更改都会立即在本地上构建并可供您运行的 JupyterLab 使用。刷新 JupyterLab 以在浏览器中加载更改(您可能需要等待几秒钟以等待扩展重新构建)。

默认情况下,jlpm run build 命令为此扩展生成源映射,以便更容易使用浏览器开发工具进行调试。要为 JupyterLab 的核心扩展也生成源映射,可以运行以下命令

jupyter lab build --minimize=False

卸载

pip uninstall jupyter_bokeh

项目详情


下载文件

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

源分布

jupyter_bokeh-4.0.5.tar.gz (149.1 kB 查看哈希值)

上传

构建分布

jupyter_bokeh-4.0.5-py3-none-any.whl (148.6 kB 查看哈希值)

上传 Python 3

支持者