Registry / devops / sphinx-diagrams

sphinx-diagrams

JSON →
library0.4.0pypypiunverified

A Sphinx extension that renders diagrams using the Diagrams library, allowing you to define cloud system architecture diagrams as Python code within your documentation. Current version: 0.4.0, released February 2020. The project appears to be in maintenance mode with no recent updates.

pip install sphinx-diagrams
INSTALL
IMPORT
SIG · SPHINX-DIAGRAMS
S
sphinx-diagrams
devopspythonv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

SphinxDiagrams
from sphinx_diagrams import SphinxDiagrams
from sphinx_diagrams import SphinxDiagrams

Enable the extension in Sphinx's conf.py and use the diagram directive in reStructuredText.

# In conf.py: extensions = ['sphinx_diagrams'] # In your .rst file: .. diagram:: from diagrams import Diagram from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS with Diagram("Web Service", show=False): EC2("web") >> RDS("userdb")
Debug
Known issues
gotchaNode indices in diagram directive must be valid Python. Ensure correct indentation inside the with block.
fix
Use consistent indentation (usually 4 spaces) inside the diagram directive.
affects: all
gotchaThe show=False parameter is recommended to avoid preview windows during documentation build on headless servers.
fix
Add show=False to Diagram() constructor.
affects: all
deprecatedsphinx-diagrams 0.4.0 may not be actively maintained; it relies on the diagrams library which may have breaking changes.
fix
Pin diagrams library version or check compatibility before upgrade.
affects: 0.4.0
Upgrade
Version history
0.4.0latest on PyPI · released Aug 17, 2021
Audit
Dependencies
sphinxrequiredCore dependency: Sphinx extension
diagramsrequiredRequired for rendering diagrams
Agent activity
7 hits · last 30 days
node
6
Resources
sphinx-diagrams — pip install sphinx-diagrams · libregistry