sphinx-plotly-directive
A directive for including a plotly figure in a Sphinx document
What it is and what it does
sphinx-plotly-directive is a Sphinx extension that lets you embed interactive Plotly charts directly into documentation by writing Python code in a special directive block. When Sphinx builds your docs, the directive executes the code and renders the resulting Plotly figure inline, similar to how Matplotlib's plot directive works. It depends on plotly and pandas to generate and manipulate the visualizations.
The package is designed for technical documentation where you want live, interactive charts rather than static images. However, it has been abandoned since early 2021 with no commits since 2022-10-25. This means it may not work reliably with recent versions of Sphinx, Plotly, or Python, and any bugs or incompatibilities will not be addressed by the maintainer.
Use it for:
- Add interactive scatter plots, line charts, or other Plotly visualizations to API or library documentation.
- Build scientific or data-analysis documentation where readers can hover over data points to see values.
- Create tutorial or guide documents that demonstrate Plotly usage with live, embedded examples.
- Generate reports or technical specs that include interactive charts without requiring separate HTML files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds a Sphinx directive to embed interactive Plotly figures directly into Sphinx documentation by executing Python code that generates plots.
No, unless you are working with an older, stable Sphinx and Plotly stack and can tolerate the risk of unmaintained code. The package is abandoned with no updates since 2021-02-27. For new projects, consider alternatives that are actively maintained. If you must use it, pin your dependencies to versions known to work and test thoroughly.
Install
sphinx-plotly-directive on PyPI
pip
pip install sphinx-plotly-directiveuv
uv add sphinx-plotly-directivepoetry
poetry add sphinx-plotly-directiveInstalling sphinx-plotly-directive
Before you install
Low install friction with only plotly and pandas as runtime dependencies. However, the package is abandoned—last release was 2021-02-27 and last commit 2022-10-25. No active maintenance means bugs and compatibility issues are unlikely to be fixed.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is recorded. Before relying on this package in a project with licensing constraints, verify the actual license from the repository.
Quickstart
pip install sphinx-plotly-directive
# In your Sphinx conf.py, add 'sphinx_plotly_directive' to extensions
# Then in a .rst file:
# .. plotly::
#
# import plotly.express as px
# px.scatter(x=[0, 1, 2], y=[0, 1, 4])
Requires Sphinx to be installed and configured; the directive must be registered in your Sphinx conf.py extensions list.
Verify before relying
- Compatibility with current versions of Sphinx, Plotly, and pandas since last release was 2021-02-27.
- Whether the unclear license permits your intended use case.
- Whether the package works reliably with modern Python versions despite requiring >=3.6.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — plotly, pandas |
| Maintenance | abandoned — 1,994 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 104,987/month — #12,728 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinx_plotly_directive-0.1.3-py3-none-any.whl
Tags
More Sphinx packages
Parses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
sphinxcontrib-qthelpA Sphinx extension that converts documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-youtubeAdds Sphinx directives to embed YouTube, Vimeo,…
permissive · top 15,000 on PyPI
plotlyPlotly is an interactive, browser-based…
permissive · top 1,000 on PyPI
plotly-expressPlotly Express is now a compatibility shim that…
permissive · top 5,000 on PyPI
sphinxcontrib-plantumlAdds PlantUML diagram rendering to Sphinx…
permissive · top 15,000 on PyPI
sphinx-panelsA Sphinx extension that adds directives for…
permissive · top 15,000 on PyPI
sphinxcontrib-mermaidEmbeds Mermaid diagrams (flowcharts, sequence…
permissive · top 5,000 on PyPI
ridgeplotridgeplot creates interactive ridgeline plots…
permissive · top 15,000 on PyPI
sphinx-promptSphinx Prompt is a Sphinx extension that…
permissive · top 5,000 on PyPI
kaleidoKaleido generates static images (PNG, SVG, PDF,…
unclear · top 5,000 on PyPI
sphinxcontrib-videoA Sphinx extension that embeds HTML5 videos…
permissive · top 15,000 on PyPI