NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #871 most downloaded on PyPI
Python interface to Graphviz's Dot
Last release 1 years ago
17 Jun 2025
Ships unpredictably
gaps range from 1 weeks to 2.9 years
Most releases are documented
notes for 21 of 29 stable releases
Nothing withdrawn
no release was ever pulled
19 years old
29 releases · first in 2008
Updated pyparsing to >=3.1.0. Required for pydot to function correctly.
Fixed:
>=3.1.0. Required for pydot to function correctly. (#477)Added initial type annotations. (#430) There are still a lot of Anys, but Pydot now officially supports type annotations.
Added:
Anys, but Pydot now officially supports type annotations.Changed:
Common.get_top_graph_type with a default. (#437)GraphParser class. (#464)
It's a user-transparent change, but now it's easier to debug, test, and modify the parser.
See the related Pull Request for more information.Fixed:
call_graphviz on Windows. (#431)to_string() output. (#434)Removed:
Common.__get_attribute__. (#426)One column per quarter.
Fixed capitalized keywords in labels being unquoted. (#449, #450)
Fixed numeric quoting behavior.
All to_string() methods now accept an indent keyword argument, which can be either a number or a string. indentation=4 will indent each level of the o
Added:
to_string() methods now accept an indent keyword argument, which can be
either a number or a string. indentation=4 will indent each level of the
output with four spaces. indentation=" " will indent each level by that many
spaces. Other whitespace is also valid, e.g. indent="\t" for tab indents. (#359)Changed:
This is a bugfix release to correct a critical error introduced in 3.0.0.
This is a bugfix release to correct a critical error introduced in 3.0.0.
Changed:
Edge.to_string(). (#384)Breaking change: support for Python 3.7 dropped totally (#371). It was already dropped, but now it's official.
Removed:
.create_attribute_methods() from classes (#318).
Setters and getters for attributes are now added to class definitions
by calls to pydot.core.__generate_attribute_methods() immediately
after the class is defined, for better compatibility with type-checking
and introspection.Changed:
.get_*() lookup methods.
If a name requiring quotes was later set using .set_name(), no quotes would be
added, causing the graph definition to become invalid.
(Thanks to @tusharsadhwani for initially pointing out the name-quoting issues.)Added:
pydot. For
details, see the new section on Troubleshooting in README.md.This makes the test suite option --no-check redundant. It has no effect except for printing a deprecation warning. It will be removed in a future majo…
Changed:
Broken parsing caused by pyparsing updates fixed. (#296)
With this, the pydot project rises from the dead.
(Internal) CI revived by @ferdnyc. (#302) Modernized and clarified the development process. Testing is done against multiple Python versions.
Reorganized package/module structure. (#230)
The pydot package is installed as a directory now instead of as
two modules:
Before (pydot 0.x, 1.x) After (pydot 2.x)
site-packages/ site-packages/
|-- pydot.py `-- pydot/
`-- dot_parser.py |-- __init__.py
|-- core.py
|-- dot_parser.py
`-- exceptions.py
This is mostly an internal change that should go unnoticed by most
users, especially those upgrading through pip or a software
distribution. import pydot should work as it did before.
Special cases:
import dot_parser no longer works. Change it to
from pydot import dot_parser or see if you can use the wrappers
pydot.graph_from_dot_data() or pydot.graph_from_dot_file().
USER FEEDBACK REQUESTED
We assume pydot users do not often directly import dot_parser.
If you do, please report your reasons, so that we can consider
making it available again before the final release of pydot 2.0:
https://github.com/pydot/pydot/issues/230
If you use pydot from a (cloned) pydot source tree:
src/pydot/.PYTHONPATH environment variable: Append /src,
e.g. PYTHONPATH=~/Development/pydot/src. If you need to switch
between pydot 1.x and pydot 2.x, add both, e.g.
PYTHONPATH=~/Development/pydot/src:~/Development/pydotpip install -e . from the top directory of the source tree to
update the links.For users of the test suite:
--no-check redundant. It has
no effect except for printing a deprecation warning. It will be
removed in a future major release (pydot 3 or higher), then
leading to an error.Reorganized exception hierarchy: (#230)
PydotException, derived from Python's Exception.Error exception class is now derived from PydotException
instead of from Python's built-in Exception directly. Existing
handlers should not be affected.InvocationException was removed. It has not been
raised by pydot since 2016 (v1.2.0).API (minor): Renamed the first parameter of the parser functions
listed below from str to s. These functions primarily exist for
internal use and would normally be called using positional arguments,
so few users should be affected. (#229)
push_top_graph_stmt(s, loc, toks)
push_graph_stmt(s, loc, toks)
push_subgraph_stmt(s, loc, toks)
push_default_stmt(s, loc, toks)
push_attr_list(s, loc, toks)
push_edge_stmt(s, loc, toks)
Deprecated:
--no-check. See "Reorganized package/module
structure" above.Removed:
…at that time. Pydot does not emit any deprecation warnings about this. Further pydot 1.x.x releases are currently not foreseen, but if there are any,…
Added:
README.md. (#141)Changed:
Deprecated:
Fixed:
!=) between two separate, but
equal Edge instances will now correctly return False, as it
already did on Python 3. (#248)TypeError in handling of DOT parser error. (#176)TypeError in graph_from_adjacency_matrix() and
graph_from_incidence_matrix(). (#98)TypeError when creating an edge with a Subgraph or
Cluster object (as opposed to name string) as an edge point. (#89).bat/.exe suffix problem). (#205)SYSTEMROOT environment
variable. (#208)Make graph, edge, node attributes order deterministic
Installation of pydot in conda env on Windows directly supported
Move errno from os to builtin. Fixes #177 (#191, #182)
ENH: propagate LD_LIBRARY_PATH when calling GraphViz
LD_LIBRARY_PATH when calling GraphVizOSError when a GraphViz executable is not found__str__ to classes Node, Edge, Graphencoding to Dot methods create, writeEdge.__init__src, dst, overwrite if points defined in obj_dictquote empty strings to avoid graphviz errors
Nothing published for this version
Nothing published for this version
bumped dependency to pyparsing >= 2.1.4
pyparsing >= 2.1.4chardetchardetAPI:
on all operating systems, search GraphViz
executables in environment $PATH,
using subprocess.Popen.
No paths hard-coded due to security and privacy issues.
add option to pass GraphViz executable name
or absolute path as prog to pydot.Dot.write_* methods.
This provides an alternative to
adding GraphViz to the $PATH.
the functions:
pydot.graph_from_dot_datapydot.graph_from_dot_filedot_parser.parse_dot_data
changed to always return a list of graphs,
instead of behaving differently for singletons.require that the user explicitly give an encoding to
the function pydot.graph_from_dot_file,
with default encoding same as io.open.
decode to unicode at program boundaries, and
treat binary images as bytes,
for more compatibility with python 3.
Use io.open, instead of the built-in open.
rm function pydot.set_graphviz_executables
rm attribute pydot.Dot.progs
compatibility with pyparsing >= 1.5.7
pyparsing >= 1.5.7API:
pydot.Graph.to_string: hide subgraph keyword only if so requestedwarnings.warn if pydot.dot_parser fails to import,
instead of printMaintenance release that keeps the same API
pyparsing == 1.5.7setup.pyFixed issue 52. Improved handling of BOM-less UTF-8 encoded files.
Dot.create - Patch merged.__get_attribute__ to not
assume the parent graph is always retrievable.Improved the message raised by TypeErrors.
TypeErrors.create() and
create_*() family of functions. If a string is passed it's expected
to be simply the name of the program. If a list is passed it's
assumed to contain strings, the name of the layout engine as the
first element, followed by any optional arguments that will be later
appended to the command line.The release 1.0.2 of pydot boasts the following:
The release 1.0.2 of pydot boasts the following:
The parser has been improved a lot. It passes all of GraphViz's regression tests (which I consider quite an accomplishment seeing the kind of crazy constructs on those )
Different charsets should now be dealt with properly.
The search of GraphViz's executables has been improved for all platforms. On Windows, paths and registry keys are searched. On Unix now it should exhibit the same behavior as the traditional shell path search. (Thanks Andy Gimblett and many others)
Double-quoted paths in Windows are nor properly handled. The os.path.exists() check fails if a valid path is enclosed within quotes.
'type' keyword has been changed everywhere to 'graph_type'
Better handling of Node/Edge/Graph defaults. Added methods: set_graph_defaults, set_node_defaults, set_edge_defaults, get_graph_defaults, get_node_defaults, get_edge_defaults
Now it's possible to use rank to lay out nodes at the same level
graph = pydot.Dot('graphname', graph_type='digraph')
subg = pydot.Subgraph('', rank='same')
subg.add_node(pydot.Node('a'))
graph.add_subgraph(subg)
subg.add_node(pydot.Node('b'))
subg.add_node(pydot.Node('c'))
Multiple main graphs in a file are now supported, will be returned as a list of graph instances
Handling of shapefiles Dot().set_shape_files()
Added method "add_style()" to the Node class to easily append styles to a node
Attribute lists updated to reflect the available ones in graphviz 2.16
Added error reporting when rendering graphs with GraphViz executables. There was an often reported problem where the output graphs would have 0 size. In most cases this was due to Graphviz missing a library for a format that pydot assumed to be there. Now the error given by the executable will be reported instead of being silently ignored (Thanks Jarno)
Improved parsing of identifiers
Added non-GraphViz attributes needed by dot2tex
Jose Fonseca contributed a fix dealing with quoted strings the the dot parsing module
setup.py updated so that it's possible to install pydot through Setuptools' easy_install
Edge()'s can be created passing two Node objects as well as, the previously supported, two strings with node names. Warning: when passing two Node instances, the attributes won't be taken into account. The edge will only read the Nodes' names to create an edge, the Nodes must be separately added to the graph so all their attributes are "remembered".
Substituted all str()'s for unicode()'s
It's possible now to manually specify the path to GraphViz's executables in the case they can't be found automatically. The method 'set_graphviz_executables(paths)' will take a dictionary specifying the location of the executables. Please refer to the documentation for usage detailed information.
And too many bugfixes to list...
Performance:
The new pydot stores graphs and their objects using a hierarchy of nested dictionaries and lists. Graph, Node, Edge objects are mere proxies to the data and are created on demand. So that now it's possible to have a graph with a 1 million edges and there will not be a single Edge instance (only if requested, then they will be created on demand, mapping the data and providing with all the methods to act on the data in the global dictionary).
Storing a graph with 1 million edges in pydot 1.0 has approximately the same memory requirements (~813MiB) as dealing with one with only 40.000 edges in pydot 0.9 (~851MiB), the 40.000 edges graph needs ~35MiB in pydot 1.0 . Handling graphs should be much faster, as no linear searches are performed in pydot 1.0
dot_parser.py, pydot.py: Updated docstrings
2004-12-21 09:12 carrer
* dot_parser.py, pydot.py: Updated docstrings
2004-12-20 11:19 carrer
* dot_parser.py: Parsing of dot files greatly improved
2004-12-20 11:17 carrer
* pydot.py: Added new attributes introduced in Graphviz 1.16.
Added support to pickle graphs. Parsing of dot files greatly
improved. Bumped version to 0.9.10.
2004-12-14 07:48 carrer
* pydot.py: Improved the processing of the graph's default values
2004-10-11 21:10 carrer
* README:
Added list of required software to the README
2004-10-11 21:09 carrer
* MANIFEST, setup.py:
Added dot_parser module
2004-10-11 21:06 carrer
* dot_parser.py, pydot.py:
Thanks to a great contribution from Michael Krause, pydot is now
able to load DOT files. The loader has been tested against
plethora of test DOT files, and the results written to PS files,
which ended up being identical to the ones obtained straight from
running them through dot. Functions 'graph_from_dot_file' and
'graph_from_dot_data' have been added. This feature requires the
pyparsing module.
Note that if using pyparsing <1.2 the tabs in labels are
converted to whitespaces. 1.2 fixed that.
Adrian Heilbut noticed that there was no way of telling pydot to
create HTML labels. Starting from this version, if the label's
first character is '<' and last is '>', the label will be treated
as HTML. If this is not the desired behaviour it suffices with
adding a whitespace before the first '<' character or after the
last '>'.
Version bumped to 0.9.9
2004-10-11 21:02 carrer
* pydot.py:
Added check to add_node() avoid creating nodes with the same
names.
2004-10-11 20:59 carrer
* pydot.py:
When adding an edge through add_edge() the correspoding Node
objects were not being created. While the graph was correctly
displayed it was not possible to modify the node attributes, as
it did not exist. Thus now, everytime an edge is added, the
corresponding nodes are created if they did not previously exist.
2004-07-08 01:44 carrer
* pydot.py: Fixed bug reported by Hector Villafuerte.
2004-07-08 00:11 carrer
* pydot.py: Fixed bug reported by Colin Gillespie regarding the
problem creating clusters due to the 'simplify' attribute
missing.
2004-07-07 23:51 carrer
* pydot.py: Set default program with which to process the output
and added some minor enhacement enabling to pass non-str objects
as Node names, which will be converted to str by retrieving their
string representation with str()
2004-05-20 10:47 carrer
* pydot.py: Bumped version to 0.9.4
2004-05-20 10:41 carrer
* pydot.py: Minor bugfix
2004-05-03 23:45 carrer
* pydot.py: Merged fixes by Ramon Felciano: -Better handling of
default 'node' and 'edge' definitions. -Subgraph class now
accepts the same parametes as Graph.
2004-05-01 14:24 carrer
* README, setup.py: Changed license from GPL to MIT.
2004-05-01 14:00 carrer
* pydot.py: Minor bugfix. Added methods to retrieve an edge's
source and destination.
2004-05-01 13:49 carrer
* pydot.py: Minor bugfixes. License has been changed from GPL to
MIT. The following features have been implemented, as suggested
by Ramon Felciano: -Ability to retrieve nodes/subgraphs (by
name) and edges (by src+target) from a graph. -Ability to get
the graph's node/edge/subgraph lists. -Ability to get the
attributes from the objects, not only set them.
2004-05-01 13:34 carrer
* LICENSE: Changed license from GPL to MIT.
2004-04-28 21:52 carrer
* ChangeLog: [no log message]
2004-04-28 21:50 carrer
* pydot.py: Some of the changes already made should allow pydot to
run on OSX. Bumped version to 0.9.2
2004-04-24 17:52 carrer
* setup.py: Added more metainformation to the distribution.
2004-04-24 17:51 carrer
* pydot.py: Added support for circo and fdp. Fixed piping mechanism
to not to capture stderr.
2004-04-24 13:26 carrer
* ChangeLog, LICENSE, MANIFEST, README, setup.py: Adding
supplementary files to the distribution to the CVS.
2004-04-24 12:57 carrer
* pydot.py: Bumped version to 0.9.1
2004-04-24 01:36 carrer
* pydot.py: Implemented tweaks suggested by John B. Cole to handle
non-str nodes, converting them to strings.
2004-04-24 01:10 carrer
* pydot.py: Applied patch for Windows support by Kent Johnson.
2004-04-24 01:05 carrer
* pydot.py: Fixed to properly handle unicode strings in attributes.
2004-04-20 00:06 carrer
* pydot.py:
Fixed silly error in graph_from_edges. When pasting the function
into the code, the references to the pydot module were not
removed, which are no longer needed since we now are _in_ the
module.
2004-04-19 23:33 carrer
* pydot.py:
Added support to write files with the desired output format with
write_[format]
2004-04-19 22:53 carrer
* pydot.py:
Done some clean up, no major changes.
2004-04-08 00:22 carrer
* pydot.py:
Initial revision.
2004-04-08 00:22 carrer
* pydot.py: Initial revision
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →