Get realtime insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in realtime with unbounded cardinality. Learn more →
Top 23 Python Graph Projects

darkflow
Translate darknet to tensorflow. Load trained weights, retrain/finetune using tensorflow, export constant graph def to mobile devices

InfluxDB
Power RealTime Data Analytics at Scale. Get realtime insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in realtime with unbounded cardinality.

rdflib
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.

pygraphistry
PyGraphistry is a Python library to quickly load, shape, embed, and explore big graphs with the GPUaccelerated Graphistry visual graph analyzer

asciichart
Nicelooking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies

SaaSHub
SaaSHub  Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

beagle
Beagle is an incident response and digital forensics tool which transforms security logs and data into graphs. (by yampelo)

causallearn
Causal Discovery in Python. It also includes (conditional) independence tests and score functions.

moviespythonbolt
Neo4j Movies Example application with Flask backend using the neo4jpythondriver

GraphBasedLocalTrajectoryPlanner
Local trajectory planner based on a multilayer graph framework for autonomous race vehicles.

stark
Official Code of "STaRK: Benchmarking LLM Retrieval on Textual and Relational Knowledge Bases" (by snapstanford)

redditdetective
Play detective on Reddit: Discover political disinformation campaigns, secret influencers and more

SaaSHub
SaaSHub  Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Extra fun: We find most enterprise/gov graph analytics work only requires 12 attributes to go along with the graph index, and those attributes often are already numeric (time, $, ...) or can be dictionaryencoded as discussed here (categorical, ID, ...)... so even 'tough' billion scale graphs are fine on 1 gpu.
Early, but that's been the basic thinking into our new GFQL system: slice into the columns you want, and then do all the inGPU traversals you want. In our V1, we keep things dataframenative include the inGPU data representation, and are already working on the first extensions to support switching to more graphnative indexing for steps as needed.
Ex: https://github.com/graphistry/pygraphistry/blob/master/demos...
Project mention: RAG Using Structured Data: Overview and Important Questions  news.ycombinator.com  20240110Ok, using ChatGPT and Bard (the irony lol) I learned a bit more about GNNs:
GNNs are probabilistic and can be trained to learn representations in graphstructured data and handling complex relationships, while classical graph algorithms are specialized for specific graph analysis tasks and operate based on predefined rules/steps.
* Why is PyG it called "Geometric" and not "Topologic" ?
Properties like connectivity, neighborhoods, and even geodesic distances can all be considered topological features of a graph. These features remain unchanged under continuous deformations like stretching or bending, which is the defining characteristic of topological equivalence. In this sense, "PyTorch Topologic" might be a more accurate reflection of the library's focus on analyzing the intrinsic structure and connections within graphs.
However, the term "geometric" still has some merit in the context of PyG. While most GNN operations rely on topological principles, some do incorporate notions of Euclidean geometry, such as:
 Node embeddings: Many GNNs learn lowdimensional vectors for each node, which can be interpreted as points in a vector space, allowing geometric operations like distances and angles to be applied.
 Spectral GNNs: These models leverage the eigenvalues and eigenvectors of the graph Laplacian, which encodes information about the geometric structure and distances between nodes.
 Manifold learning: Certain types of graphs can be seen as lowdimensional representations of highdimensional manifolds. Applying GNNs in this context involves learning geometric properties on the manifold itself.
Therefore, although topology plays a primary role in understanding and analyzing graphs, geometry can still be relevant in certain contexts and GNN operations.
* Real world applications:
 HuggingFace has a few models [0] around things like computational chemistry [1] or weather forecasting.
 PyGod [2] can be used for Outlier Detection (Anomaly Detection).
 Apparently ULTRA [3] can "infer" (in the knowledge graph sense), that Michael Jackson released some disco music :p (see the paper).
 RGCN [4] can be used for knowledge graph link prediction (recovery of missing facts, i.e. subjectpredicateobject triples) and entity classification (recovery of missing entity attributes).
 GreatX [5] tackles removing inherent noise, "Distribution Shift" and "Adversarial Attacks" (ex: noise purposely introduced to hide a node presence) from networks. Apparently this is a thing and the field is called "Graph Reliability" or "Reliable Deep Graph Learning". The author even has a bunch of "awesome" style lists of links! [6]
 Finally this repo has a nice explanation of how/why to run machine learning algorithms "outside of the DB":
"Pytorch Geometric (PyG) has a whole arsenal of neural network layers and techniques to approach machine learning on graphs (aka graph representation learning, graph machine learning, deep graph learning) and has been used in this repo [7] to learn link patterns, also known as link or edge predictions."

0: https://huggingface.co/models?pipeline_tag=graphml&sort=tre...
1: https://github.com/Microsoft/Graphormer
2: https://github.com/pygodteam/pygod
3: https://github.com/DeepGraphLearning/ULTRA
4: https://huggingface.co/rishipnv/RGCN
5: https://github.com/EdisonLeeeee/GreatX
6: https://edisonleeeee.github.io/projects.html
7: https://github.com/Orbifold/pyglinkprediction
You may like my Netgraph library [1], which is a Python library that aims to complement networkx, igraph, and graphtool with publicationquality visualisations.
Netgraph implements numerous node layout algorithms and several edge routing routines. Uniquely among Python alternatives, it handles networks with multiple components gracefully (which otherwise break most node layout routines), and it postprocesses the output of the node layout and edge routing algorithms with several heuristics to increase the interpretability of the visualisation (reduction of overlaps between nodes, edges, and labels; edge crossing minimisation and edge unbundling where applicable). The highly customisable plots are created using Matplotlib, and the resulting Matplotlib objects are exposed in an easily queryable format such that they can be further manipulated and/or animated using standard Matplotlib syntax. Finally, Netgraph also supports interactive changes: with the InteractiveGraph class, nodes and edges can be positioned using the mouse, and the EditableGraph class additionally supports insertion and deletion of nodes and edges as well as their (re)labelling through standard textentry.
[1] https://github.com/paulbrodersen/netgraph
I really wish Livecode hadn't pulled their opensource/Community Edition (and I'd be very glad for someone to do something with that code).
Gambas is something I keep wanting to try and seems promising.
I did one small app w/ Python and TKinter, but it was a dense wall of text/code when I was finished and not something I was interested in revisiting. I keep seeing suggestions that Python w/ QT support is supposed to be quite good.
One unlikely option is Google's Blockly (which I wish had a standalone desktop implementation which would make graphical programs), which has a nifty version implementing OpenSCAD:
https://www.blockscad3d.com/editor/
which I've used a fair bit. Moving on from there, there is: https://github.com/derkork/openscadgrapheditor which has the advantage of encompassing the entirety of OpenSCAD. It's also possible to wrap up Python using PythonSCAD.org
If you're willing to consider other node/line connection systems two promising options are:
https://ryven.org/
and
https://nodezator.com/
What sort of coding, on what sort of projects do you want to do?
Project mention: STaRK: Benchmarking LLM Retrieval on Textual and Relational Knowledge Bases  news.ycombinator.com  20240510
Python Graph related posts

Graph Data Fits in Memory

The "missing" graph datatype already exists. It was invented in the '70s

RAG Using Structured Data: Overview and Important Questions

Show HN: Comflowy – A ComfyUI Tutorial for Beginners

Displaying Content as a Graph

NeurIPS 2023 Posters Cluster Visualization

NetworkX – Network Analysis in Python

A note from our sponsor  InfluxDB
www.influxdata.com  20 May 2024
Index
What are some of the best opensource Graph projects in Python? This list will help you:
Project  Stars  

1  algorithms  23,624 
2  darkflow  6,128 
3  gprof2dot  3,114 
4  rdflib  2,087 
5  pygraphistry  2,064 
6  Graphormer  1,944 
7  asciichart  1,815 
8  pythono365  1,569 
9  beagle  1,250 
10  causallearn  995 
11  facepy  864 
12  communities  700 
13  DGFraud  655 
14  netgraph  648 
15  Nodz  405 
16  nodezator  396 
17  moviespythonbolt  372 
18  cog  283 
19  how_attentive_are_gats  275 
20  forceatlas2  274 
21  GraphBasedLocalTrajectoryPlanner  232 
22  stark  220 
23  redditdetective  206 
Sponsored