sphinx-kroki
Embed PlantUML, DOT, etc. diagrams in your Sphinx-based documentation using kroki.
Instalation
Install this package via pip:
pip install sphinx-kroki
and enable in project configuration (conf.py):
extensions = [
'sphinx_kroki',
]
Usage
Inline diagram, show as svg:
.. kroki::
:caption: Diagram
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
Load a diagram from a file and show as png:
.. kroki:: ./path/to/graph.puml png
Options
:align:The horizontal alignment of the diagram (left, center or right);:caption:The caption of the diagram;:class:The class names (a list of class names separeted by spaces);:filename:The path to the file with the diagram;:format:The output format of the diagram (default svg);:name:The hyperlink reference to the element;:options:: The diagram options in yaml format;:type:The type of the diagram (actdiag, blockdiag, bpmn, bytefield, c4plantuml, dot, ditaa, er, erd, excalidraw, graphviz, mermaid, nomnoml, nwdiag, packetdiag, pikchr, plantuml, rackdiag, structurizr, seqdiag, svgbob, umlet, vega, vegalite, wavedrom).
The diagram type can be automatically derived from the file extension (as same as type).
Additional supported extensions:
| Extension | Type |
|---|---|
| *.bob | svgbob |
| *.c4 | c4plantuml |
| *.c4puml | c4plantuml |
| *.dot | graphviz |
| *.dsl | structurizr |
| *.er | erd |
| *.gv | graphviz |
| *.iuml | plantuml |
| *.pu | plantuml |
| *.puml | plantuml |
| *.uxf | umlet |
| *.vg | vega |
| *.vgl | vegalite |
| *.vl | vegalite |
| *.wsd | plantuml |
Configuration
kroki_url(default https://kroki.io).kroki_output_format(default svg).
Alternatives
Metadata
Release files for sphinx-kroki 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx_kroki-0.1.0.tar.gz | 95.5 kB | Without provenance | Details for sphinx_kroki-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_kroki-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sphinx_kroki-0.1.0-py3-none-any.whl |
Total release size: 103.6 kB
Release files / sphinx_kroki-0.1.0.tar.gz
| Download URL | sphinx_kroki-0.1.0.tar.gz |
|---|---|
| Size | 95.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c384caffc2d25a2a45c623b0ce306b7b8df0c9c5894c57c12fe9bdfadcb7a549
|
|
BLAKE2b-256 checksum How to use checksums |
bbeff7737c20f36dc844a45a6f0f0d992b616e7a08ba0193704b48b591556d37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / sphinx_kroki-0.1.0-py3-none-any.whl
| Download URL | sphinx_kroki-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7401864a6becd1615f71665d3ac4c340a54d75e44b40b45fd07b856e8afda179
|
|
BLAKE2b-256 checksum How to use checksums |
d419470b284ac5e6ec1c5656e70f03e6862d17c1690c91ed3d39240492ce3e49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for sphinx-kroki 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.