Skip to main content

Convert graphviz (dot) files into (mxGraph) format

Project description


pypi Build Status

Convert graphviz (dot) files into (mxGraph) format

Getting Started


graphviz2drawio requires Python 3 and Graphviz

  • On Mac OS these can be installed with Homebrew:
brew update; brew install python3 graphviz
pip3 install pygraphviz --install-option="--include-path=/usr/local/include/graphviz" --install-option="--library-path=/usr/local/lib/graphviz/"
  • On Ubuntu / Debian based Linux, install graphviz using:
sudo apt install python3-pip graphviz graphviz-dev

If you encounter installation errors you may need to manually install pygraphviz with links to the graphviz libraries

Installation / Upgrade

pip3 install graphviz2drawio --upgrade


Run the conversion app on your graphviz file


You can them import the output XML file into

Python Usage

from graphviz2drawio import graphviz2drawio

xml = graphviz2drawio.convert(graph_to_convert)

where graph_to_convert can be any of a file path, file handle, string of dot language, or PyGraphviz.AGraph object


Please open an issue with your dot file to report crashes or incorrectect conversions.

Built With


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Code Formatting

This project is linted with pyflakes and makes strict use of Black for code formatting.




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 graphviz2drawio, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size graphviz2drawio-0.2.0-py3-none-any.whl (29.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size graphviz2drawio-0.2.0.tar.gz (13.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page