pygraphs
pygraphs
is a Python package dedicated to the study of graphs as discrete data structures and graph algorithms.
Source code is available on GitLab, together with simple makefiles.
Features
 Efficient data structures written in modern C++ 17 and wrapped into Python using Swig
 Directed and undirected Graphs
 Priority Queue using Binary Heap
 Classic algorithms are implemented in Python 3 with type annotations
 BreadthFirst and DepthFirst iteration with generators
 Finding Eulerian cycles through Hierholzer’s algorithm
 Computing the minimum Hamiltonian circuit using HeldKarp’s method
 Shortest paths with BellmanFord, Dijkstra and FloydWarshall algorithms
 Minimum spanning trees through Prim
 Topological sorting and finding strongly connected components using variants of DFS
 Computing maximum network flow with an EdmondsKarp implementation of the FordFulkerson Algorithm
 Maximum cardinality matching of bipartite graphs via HopcroftKarpKarzanov
Usage
Note: at this point, distributed packages are compatible with Linux only and require a recent version of libstdc++
.

Install via pip:
pip install i https://test.pypi.org/simple/ pygraphs user

Import the package:
import pygraphs as pyg