Skip to main content

Sphinx Extension to include files

Project description


Sphinx Extension to add the drawio directive to include diagrams.

Important: This extension is in development and not all features will work as advertised or at all.

The drawio-desktop package does not run without an x-server (e.g. when in a CI environment), see this issue. The workaround is to install xvfb-run.


  1. python3 -m pip install sphinxcontrib-drawio
  2. In your sphinx config:
extensions = [
  1. Add the binary to $PATH. For Windows add C:\Program Files\ and on Linux add /opt/
  2. (required by default, see below) sudo apt install xvfb


These are the available options and their default values.

drawio_output_format = "png"
drawio_binary_path = "/path/to/"
drawio_headless = True


.. drawio:: example.drawio
    :format: png
    :alt: An Example
    :align: center

If any other of the CLI tool's options are wanted, please file an issue.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sphinxcontrib-drawio, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size sphinxcontrib_drawio-0.0.5-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sphinxcontrib-drawio-0.0.5.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page