Python graphlib -- an opportunity

In Python 3.9, something interesting arrived: graphlib — Functionality to operate with graph-like structures — Python 3.11.1 documentation

This is a (currently very minimal) home for graph algorithms and processing in the Python core standard library. I think this is interesting from a Graphviz perspective because many (most?) people on this forum seem to be interacting with Graphviz through Python.

We (yes you!) have an opportunity to contribute to and influence the future of graph processing in Python. This would be getting in on the ground floor; as I said, this module is new to the standard library and still small. Including serialization to DOT in graphlib would be a valuable extension. But I think an even more ambitious goal would be to take some of the core algorithms and ideas of Graphviz and reimplement them in a modern programming environment. Or even take some of the planned-but-never-implemented Graphviz features and implement them here. There is a rich 50+ year history of graph algorithm/visualization research that could be made accessible to a new generation of programmers.

I have no involvement with Python’s graphlib, I’m just thinking aloud. But I expect they’re open to contributors.

2 Likes

I was not even aware of this opportunity. Thanks for telling us about it.

Unrelated to Python, but I always thought extending the Boost Graph Library to include the dot layout(s) would be excellent.
…or inversely…
To replace the underlying cgraph data container with the boost graph library data container.

The main benefit should be furthering the separation of the graph container from the layout algorithms…

Some previous attempts at making graph libraries for python include igraph, networkX, and networKit. I see from this benchmark that snap and lithographs were contenders too. And Plotly has networks.