libnetworkit

Toolkit for analyzing large-scale networks and graphs efficiently.

brewmacoslinux
Try with needOr install directly
Source

About

NetworKit is an OS-toolkit for large-scale network analysis

Examples

analyze network structure and find important nodes$ python3 -c "import networkit as nk; G = nk.readGraph('network.edgelist', nk.Format.EdgeListSpaceZero); nk.centrality.Betweenness(G).run()"
measure clustering coefficient in a graph$ python3 -c "import networkit as nk; G = nk.readGraph('graph.gml', nk.Format.GML); print(nk.clustering.ClusteringCoefficient.avgLocal(G))"
detect communities in a network$ python3 -c "import networkit as nk; G = nk.readGraph('network.edgelist', nk.Format.EdgeListSpaceZero); nk.community.PLM(G).run()"
compute shortest paths between nodes$ python3 -c "import networkit as nk; G = nk.readGraph('graph.edgelist', nk.Format.EdgeListSpaceZero); nk.distance.BFS(G, 0).run()"
generate a random network for testing$ python3 -c "import networkit as nk; G = nk.generators.ErdosRenyiGenerator(1000, 0.01).generate(); nk.writeGraph(G, 'output.edgelist', nk.Format.EdgeListSpaceZero)"