Registry / devops / mkdocs-diagrams

mkdocs-diagrams

JSON →
library1.0.0pypypiunverified

A MkDocs plugin that renders diagrams defined using the Diagrams library (Python DSL for cloud system architecture diagrams) inline in your documentation. The plugin hooks into the MkDocs build process, compiling .py diagram scripts into SVG or PNG images. Current version 1.0.0, stable but maintained with low release cadence.

pip install mkdocs-diagrams
INSTALL
IMPORT
SIG · MKDOCS-DIAGRAMS
M
mkdocs-diagrams
devopspythonv1.0.0
Install
5.0s avg
Import
Disk
84MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · 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 · 85.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.0s · import 0.000s · 86MB
84MB installed
● package 84MB
Code
Verified usage

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

DiagramsPlugin
from mkdocs_diagrams import DiagramsPlugin
from mkdocs_diagrams import DiagramsPlugin

Initialize the plugin in your MkDocs project. Add 'diagrams' to the plugins list in mkdocs.yml, then place .py diagram scripts in your docs directory.

import os from mkdocs.config.base import Config from mkdocs_diagrams import DiagramsPlugin # Minimal config simulation config = Config( plugins={ 'diagrams': DiagramsPlugin() } ) # In real use: add 'diagrams' to mkdocs.yml plugins list print("Plugin configured successfully")
Debug
Known issues
gotchaDiagram script must be valid Python and produce a diagram object. If the script fails (e.g., missing dependencies like graphviz) the MkDocs build will break.
fix
Ensure graphviz executable is installed on the system (e.g., apt-get install graphviz) and all imports are available.
affects: all
gotchaThe plugin only processes .py files that contain a diagram generation call. Files without a diagram definition will raise an error or produce empty output.
fix
Each diagram script must include a `with Diagram(...):` block and the corresponding output.
affects: all
deprecatedPython 3.6 support was dropped in version 1.0.0; package metadata now requires python>=3.7.
fix
Use Python 3.7+.
affects: >=1.0.0
Upgrade
Version history
1.0.0latest on PyPI · released Sep 4, 2020
Audit
Dependencies
diagramsrequiredRequired to compile diagram scripts
mkdocsrequiredPlugin host framework
Agent activity
15 hits · last 30 days
node
10
OpenAI (training)
2
Resources
mkdocs-diagrams — pip install mkdocs-diagrams · libregistry