{"id":24633,"library":"sphinxcontrib-nwdiag","title":"Sphinx nwdiag Extension","description":"Sphinx extension to embed nwdiag (network diagram) diagrams using the blockdiag family. Version 2.0.0 released January 2018; maintained in maintenance mode. Supports Python 2.7+ and 3.x.","status":"maintenance","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/blockdiag/sphinxcontrib-nwdiag","tags":["sphinx","extension","nwdiag","network-diagram","blockdiag"],"install":[{"cmd":"pip install sphinxcontrib-nwdiag","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Required extension framework","package":"Sphinx","optional":false},{"reason":"Required rendering backend","package":"blockdiag","optional":false},{"reason":"Required diagram library","package":"nwdiag","optional":false}],"imports":[{"note":"Extension uses setup() function; register via extensions list.","wrong":"from sphinxcontrib.nwdiag import nwdiag","symbol":"setup","correct":"from sphinxcontrib import nwdiag"}],"quickstart":{"code":"# conf.py\nextensions = ['sphinxcontrib.nwdiag']\n\n# index.rst\n.. nwdiag::\n\n   nwdiag {\n     network dmz {\n         address = \"210.x.x.x/24\"\n         web01 [address = \"210.x.x.1\"];\n         web02 [address = \"210.x.x.2\"];\n     }\n     network internal {\n         web01;\n         web02;\n         db01;\n         db02;\n     }\n   }","lang":"python","description":"Add extension to conf.py and use nwdiag directive in reStructuredText."},"warnings":[{"fix":"Upgrade to 2.0.0 and pin Sphinx < 4.0 if necessary.","message":"Sphinx 4.0+ drops Python 2.7/3.5 support; sphinxcontrib-nwdiag requires blockdiag and nwdiag which may have compatibility issues with newer Sphinx.","severity":"broken","affected_versions":"sphinxcontrib-nwdiag < 2.0.0"},{"fix":"Set 'html' builder in conf.py: html_builder = 'html'","message":"The nwdiag directive does not work with Sphinx's 'dirhtml' builder (creates nested directories). Use 'html' builder instead.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Python 3.5+.","message":"Python 2.7 support is deprecated. blockdiag and nwdiag libraries no longer receive updates for Python 2.","severity":"deprecated","affected_versions":"< 2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'sphinxcontrib.nwdiag' as the extension name in conf.py extensions list.","cause":"Wrong import path in extensions list (used dotted module instead of plain name).","error":"Extension 'sphinxcontrib.nwdiag' has no setup() function"},{"fix":"pip install blockdiag nwdiag","cause":"Missing required runtime dependency.","error":"Could not render nwdiag: blockdiag not installed"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}