Registry / sphinx-plotly-directive

sphinx-plotly-directive

JSON →
library0.1.3pypypiunverified

A Sphinx directive for embedding Plotly figures in documentation. Current version 0.1.3, release cadence is low (last release Aug 2020).

pip install sphinx-plotly-directive
INSTALL
IMPORT
SIG · SPHINX-PLOTLY-DIRE
S
sphinx-plotly-directive
pythonv0.1.3
Install
10.2s avg
Import
Disk
237MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 235.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.2s · import 0.000s · 228MB
237MB installed
● package 237MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plotly directive
No explicit import; activate via extensions = ['sphinx_plotly_directive'] in conf.py
from sphinx_plotly_directive import ...
It is a Sphinx extension, not a Python module to import in code.

Add the extension to conf.py, then use the .. plotly:: directive in RST.

# conf.py extensions = [ 'sphinx_plotly_directive', ] # index.rst .. plotly:: import plotly.graph_objects as go fig = go.Figure(data=go.Scatter(x=[1,2,3], y=[1,3,2])) fig
Debug
Known issues
gotchaThe directive expects the Python code to assign a variable `fig` (the plotly figure). If no variable named `fig` is defined, nothing is rendered.
fix
Ensure the last line or the variable name is `fig` (or use `:show-source:` option, but still need fig).
affects: all
gotchaWhen using with Sphinx 4+, there is a known issue with 'plotly' directive clashing if other plotly-related extensions are loaded. This can cause 'WARNING: directive plotly already registered'.
fix
Check for duplicate extension loading or use a different directive name via `plotly_plotly_directive_directive_name` option in conf.py (undocumented).
affects: >=0.1.0
deprecatedThe extension has not been updated since 2020. Consider using sphinxcontrib-plotly or the newer nbsphinx for Plotly support.
fix
Migrate to sphinxcontrib-plotly or nbsphinx if you need active maintenance.
affects: all
Upgrade
Version history
0.1.3latest on PyPI · released Feb 27, 2021
Audit
Dependencies
sphinxrequiredRequired as the documentation framework.
plotlyrequiredRequired to render Plotly figures.
Agent activity
4 hits · last 30 days
node
4
Resources
sphinx-plotly-directive — pip install sphinx-plotly-directive · libregistry