pydot-ng
Python interface to Graphviz's Dot
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-nguv
uv add pydot-ngpoetry
poetry add pydot-ngInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
GvGenGvGen generates Graphviz dot files…
permissive · top 15,000 on PyPI
pydotpydot is a Python interface to Graphviz that…
permissive · top 1,000 on PyPI
pydotplusPyDotPlus provides a Python interface to…
permissive · top 15,000 on PyPI
graphvizGenerates DOT language source code for graph…
permissive · top 1,000 on PyPI
pygraphvizPyGraphviz provides a Python interface to…
permissive · top 5,000 on PyPI
markdown-graphviz-inlineA Markdown extension that converts inline…
permissive · top 15,000 on PyPI
gprof2dotConverts profiler output from many sources…
copyleft · top 5,000 on PyPI
markdown-inline-graphviz-extensionA Markdown extension that converts inline…
permissive · top 15,000 on PyPI
torchvizGenerates visual diagrams of PyTorch neural…
permissive · top 5,000 on PyPI
blockdiagblockdiag generates block-diagram images from a…
permissive · top 15,000 on PyPI