Using poetry

poetry add sphinx-modeling

Using pip

pip install sphinx-modeling

Using sources

git clone
cd sphinx-modeling
pip install .
# or
poetry install


For final activation, please add sphinx_modeling to the project’s extension list of your file.

extensions = ["sphinx_modeling",]

For the full configuration, please read Configuration.

PlantUML support

A feature is planned for Sphinx-Modeling to export the defined user models into a diagram. For this PlantUML will be used and the Sphinx-extension sphinxcontrib-plantuml for generating the diagrams.

Both must be available and correctly configured to work.

Install PlantUML

  1. Download the latest version of the plantuml.jar file:

  2. Make a new folder called utils inside your docs folder. Copy the plantuml.jar file into the utils folder.

  3. Install the plantuml sphinx extension: pip install sphinxcontrib-plantuml.

  4. Add sphinxcontrib.plantuml to the sphinx extension list in

extensions = ['sphinx_needs', 'sphinx_modeling', 'sphinxcontrib.plantuml', ]
  1. Configure plantuml in

plantuml = f'java -jar {os.path.join(os.path.dirname(__file__), "utils", "plantuml.jar")}'
plantuml_output_format = 'png'