skillfed

pydot-ng

Python interface to Graphviz's Dot

pydot-ng v2.0.0 210.2K downloads/30d#9,501 on PyPI24
Permissive license MIT Abandoned released

What it is and what it does

pydot-ng is a Python wrapper around Graphviz's Dot language that lets you build, parse, and manipulate graph definitions programmatically. It bridges Python code and Graphviz, so you can create complex graph structures in Python and output them as Dot files or render them through Graphviz into images, PDFs, or other formats. The package depends only on pyparsing for parsing Dot syntax.

The package is API-compatible with the original pydot, so existing code can often switch to pydot-ng as a drop-in replacement. However, it has been abandoned since 2018 with no active maintenance, meaning no updates for newer Python versions or Graphviz changes. It remains useful for stable, legacy projects but carries risk for new development.

Use it for:

  • Generate Graphviz Dot files programmatically from Python to visualize directed or undirected graphs.
  • Parse existing Dot files into Python data structures for analysis or modification.
  • Create flowcharts, state diagrams, or network topology visualizations from Python code.
  • Integrate graph generation into documentation or reporting pipelines that feed into Graphviz rendering.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pydot-ng provides a Python interface to Graphviz's Dot language, allowing you to programmatically create, parse, and manipulate graph structures that can be rendered into various visual formats.

Yes, if you need a stable Graphviz interface for an existing or legacy project and are comfortable with an unmaintained package. The low install friction and permissive MIT license make it accessible, and it has no known vulnerabilities. No, if you are starting a new project—consider an actively maintained alternative, as pydot-ng will not receive updates for Python version changes or Graphviz compatibility issues.

Install

pydot-ng on PyPI

pip

pip install pydot-ng

uv

uv add pydot-ng

poetry

poetry add pydot-ng

Installing pydot-ng

Before you install

Installation is straightforward with low friction—only one runtime dependency (pyparsing). However, the package is abandoned as of 2018 with no recent maintenance, so expect no bug fixes or updates for new Python versions.

License in practice

MIT license is permissive, allowing use in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install pydot-ng
import pydot_ng as pydot
graph = pydot.Dot(graph_type='digraph')
graph.add_node(pydot.Node('A'))
print(graph.to_string())

Graphviz must be installed on your system to render graphs into output formats; pydot-ng only handles the programmatic interface to Dot.

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.7 despite being unmaintained.
  • Current compatibility with modern Graphviz releases and whether API changes in Graphviz affect pydot-ng functionality.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — pyparsing
Maintenance abandoned — 2,859 days since the last release
Last repo commit (repository archived)
First released
Downloads 210,219/month — #9,501 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pydot_ng-2.0.0-py2.py3-none-any.whl

Keywords: graphviz, dot, graphs, visualization

Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: Libraries :: Python Modules

Tags

graphviz python interfacedot language pythongraph visualization pythoncreate dot files programmaticallyparse graphviz dotpython graphviz wrappergraph rendering python
graphvizgraph-visualizationunmaintained

More Python Modules packages