{"id":24624,"library":"sphinx-plotly-directive","title":"sphinx-plotly-directive","description":"A Sphinx directive for embedding Plotly figures in documentation. Current version 0.1.3, release cadence is low (last release Aug 2020).","status":"active","version":"0.1.3","language":"python","source_language":"en","source_url":"https://github.com/harupy/sphinx-plotly-directive","tags":["sphinx","plotly","documentation","directive"],"install":[{"cmd":"pip install sphinx-plotly-directive","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required as the documentation framework.","package":"sphinx","optional":false},{"reason":"Required to render Plotly figures.","package":"plotly","optional":false}],"imports":[{"note":"It is a Sphinx extension, not a Python module to import in code.","wrong":"from sphinx_plotly_directive import ...","symbol":"plotly directive","correct":"No explicit import; activate via extensions = ['sphinx_plotly_directive'] in conf.py"}],"quickstart":{"code":"# conf.py\nextensions = [\n    'sphinx_plotly_directive',\n]\n\n# index.rst\n.. plotly::\n\n    import plotly.graph_objects as go\n    fig = go.Figure(data=go.Scatter(x=[1,2,3], y=[1,3,2]))\n    fig","lang":"python","description":"Add the extension to conf.py, then use the .. plotly:: directive in RST."},"warnings":[{"fix":"Ensure the last line or the variable name is `fig` (or use `:show-source:` option, but still need fig).","message":"The directive expects the Python code to assign a variable `fig` (the plotly figure). If no variable named `fig` is defined, nothing is rendered.","severity":"gotcha","affected_versions":"all"},{"fix":"Check for duplicate extension loading or use a different directive name via `plotly_plotly_directive_directive_name` option in conf.py (undocumented).","message":"When 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'.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Migrate to sphinxcontrib-plotly or nbsphinx if you need active maintenance.","message":"The extension has not been updated since 2020. Consider using sphinxcontrib-plotly or the newer nbsphinx for Plotly support.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.1.3':16 '2020':24 'aug':23 'cadenc':18 'current':14 'direct':4,7,28 'document':13,27 'embed':9 'figur':11 'last':21 'low':20 'plot':3,10,26 'releas':17,22 'sphinx':2,6,25 'sphinx-plotly-direct':1 'version':15","created_at":"2026-05-01T08:14:03.796443+00:00","updated_at":"2026-05-01T08:14:03.796443+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.1.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/harupy/sphinx-plotly-directive","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sphinx-plotly-directive/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":[],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-06","install_tag":null}}