跳转到主要内容

Plotly友好型,Jupyter Notebook HTML导出器。

项目描述

Plotly友好型,Jupyter Notebook HTML导出器。

NBConvert 是一个将 Jupyter Notebooks 转换为其他格式(pdf、html等)的模块。它提供了 HTMLExporter,用于将 Jupyter Notebooks 转换为 html。

PlotlyHTMLExporter 是从 HTMLExporter 衍生出的自定义导出器。它清理输出单元格中的 JS/HTML,但保留受信任的 plotly.js 输出完整,从而允许在生成的 html 中渲染 plotly 图表。

安装

使用 pip

$ pip install plotlyhtmlexporter

从源

$ git clone https://github.com/plotly/plotlyhtmlexporter
$ cd plotlyhtmlexporter
$ python setup.py install

使用方法

从命令行(使用NBConvert)

$ jupyter nbconvert --to plotlyhtml mynotebook.ipynb

从Python解释器

>>> import nbformat
>>> nb = nbformat.read('mynotebook.ipynb', 4)
>>> from plotlyhtmlexporter import PlotlyHTMLExporter
>>> exp = PlotlyHTMLExporter()
>>> body, resources = exp.from_notebook_node(nb)

许可证:MIT

项目详情


下载文件

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

源分发

plotlyhtmlexporter-0.0.2.tar.gz (3.5 kB 查看散列值)

由以下支持

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF赞助商 PingdomPingdom 监控 SentrySentry 错误日志 StatusPageStatusPage 状态页面