altgraph is a fork of graphlib tailored to use newer Python 2.3+ features, including additional support used by the py2app suite (modulegraph and macholib, specifically).
altgraph is a python based graph (network) representation and manipulation package. It has started out as an extension to the graph_lib module written by Nathan Denny it has been significantly optimized and expanded.
The altgraph.Graph.Graph class is loosely modeled after the LEDA (Library of Efficient Datatypes) representation. The library includes methods for constructing graphs, BFS and DFS traversals, topological sort, finding connected components, shortest paths as well as a number graph statistics functions. The library can also visualize graphs via graphviz.
Exception raised when methods are called with bad values of an inconsistent state.