14 Best Python Graph Libraries in 2024

share link

by aswini1 dot icon Updated: Feb 15, 2024

technology logo
technology logo

Guide Kit Guide Kit  

Python Graph library offers features for creating, analyzing, and manipulating networks and graphs. Graph libraries offer tools for adding or removing edges or nodes, finding cycles, and computing shortest paths. These libraries offer tools for visualizing networks and graphs. It will have customizable styling options for edges and nodes.   


Graph libraries offer various algorithms to analyze graphs. It will help find communities, detect cliques, and calculate centrality measures. Many graph libraries are designed to work with other Python libraries for machine learning and data analysis. Graph libraries support various types like undirected, weighted, bipartite, and directed graphs. It can be easily extended to support custom graph algorithms or types. They are designed with optimized data structures and algorithms for large-scale graph analysis. These libraries help in visualizing and analyzing complex data structures. They help with transportation, biological, and social networks.   


Here are the 14 best Python Graph Libraries handpicked to help developers: 

algorithms: 

  • Is a Python library that offers a collection of data structures and algorithms.  
  • Will help solve common problems in mathematics and computer science.   
  • Is a comprehensive library that includes implementations of algorithms. 
  • Includes dynamic programming, search, graph traversal, and sorting.  
  • Are implemented with efficiency in mind using optimization methods for ensuring fast performance.  

algorithmsby keon

Python doticonstar image 22653 doticonVersion:v0.1.4doticon
License: Permissive (MIT)

Minimal examples of data structures and algorithms in Python

Support
    Quality
      Security
        License
          Reuse

            algorithmsby keon

            Python doticon star image 22653 doticonVersion:v0.1.4doticon License: Permissive (MIT)

            Minimal examples of data structures and algorithms in Python
            Support
              Quality
                Security
                  License
                    Reuse

                      networkx: 

                      • Is a Python library to create, analyze, and manipulate networks and graphs.  
                      • Offers a simple and intuitive interface to work with graphs, including various graph algorithms.  
                      • Offers functions to create and manipulate graphs, like adding or removing edges or nodes.  
                      • Offers computing graph properties like centrality, shortest path lengths, and degree. 

                      networkxby networkx

                      Python doticonstar image 12745 doticonVersion:networkx-3.1doticon
                      License: Others (Non-SPDX)

                      Network Analysis in Python

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                networkxby networkx

                                Python doticon star image 12745 doticonVersion:networkx-3.1doticon License: Others (Non-SPDX)

                                Network Analysis in Python
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse

                                          gcn: 

                                          • Is a deep learning framework for graph data that is used for applications. 
                                          • Supports applications like link prediction, community detection, and node classification.  
                                          • Offers implementation of GCN like DGL (Deep Graph Library), Spektral, and PyTorch Geometric.  
                                          • Offers an efficient implementation of GCN using GPU acceleration. 

                                          gcnby tkipf

                                          Python doticonstar image 6732 doticonVersion:Currentdoticon
                                          License: Permissive (MIT)

                                          Implementation of Graph Convolutional Networks in TensorFlow

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    gcnby tkipf

                                                    Python doticon star image 6732 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                    Implementation of Graph Convolutional Networks in TensorFlow
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              darkflow: 

                                                              • Is a Python which offers a seamless interface to the Darknet Neural Network framework. 
                                                              • Is a popular open source neural network framework for recognition tasks and object detection.  
                                                              • Allows users to use the functionality of Darknet within Python, making it more accessible for a wider user range.   
                                                              • Offers object detection capabilities to detect and localize objects within videos and images.   

                                                              darkflowby thtrieu

                                                              Python doticonstar image 6090 doticonVersion:Currentdoticon
                                                              License: Strong Copyleft (GPL-3.0)

                                                              Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        darkflowby thtrieu

                                                                        Python doticon star image 6090 doticonVersion:Currentdoticon License: Strong Copyleft (GPL-3.0)

                                                                        Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  pygcn: 

                                                                                  • Is a Python library for Graph Convolutional Networks, a type of neural network designed for graph data.  
                                                                                  • Offers various graph convolutional layers like Chebyshv, GraphSAGE, and GCN layers.  
                                                                                  • Offers the ability to customize the convolutional graph layers. 
                                                                                  • Customizes the number of filters, activation functions, and layers. 
                                                                                  • Offers an easy-to-use API to load and preprocess graph data like node features and adjacency matrices. 

                                                                                  pygcnby tkipf

                                                                                  Python doticonstar image 4757 doticonVersion:Currentdoticon
                                                                                  License: Permissive (MIT)

                                                                                  Graph Convolutional Networks in PyTorch

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            pygcnby tkipf

                                                                                            Python doticon star image 4757 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                                            Graph Convolutional Networks in PyTorch
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      GraphEmbedding: 

                                                                                                      • Is a Python library for graph embedding to represent graph data in a low-dimensional vector space. 
                                                                                                      • Is a useful method for many graph-based machine learning tasks like link prediction and node classification. 
                                                                                                      • Offers a range of graph embedding algorithms like LINE, GraphSAGE, DeepWalk, and node2vec. 
                                                                                                      • Offers the ability to customize random walk length, number of negative lengths, and embedding dimensions. 

                                                                                                      GraphEmbeddingby shenweichen

                                                                                                      Python doticonstar image 3313 doticonVersion:Currentdoticon
                                                                                                      License: Permissive (MIT)

                                                                                                      Implementation and experiments of graph embedding algorithms.

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                GraphEmbeddingby shenweichen

                                                                                                                Python doticon star image 3313 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                                                                Implementation and experiments of graph embedding algorithms.
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          gprof2dot: 

                                                                                                                          • Offers a graphical visualization of profiling data generated by the GNU Profiler.  
                                                                                                                          • Generates statistical profiling information about a program’s execution.  
                                                                                                                          • Includes information about the time spent in every function and the number of times every function is called.   
                                                                                                                          • Offers the ability to customize the layout of the call graph, including the node colors, edge styles, and positions.   

                                                                                                                          gprof2dotby jrfonseca

                                                                                                                          Python doticonstar image 2742 doticonVersion:Currentdoticon
                                                                                                                          License: Weak Copyleft (LGPL-3.0)

                                                                                                                          Converts profiling output to a dot graph.

                                                                                                                          Support
                                                                                                                            Quality
                                                                                                                              Security
                                                                                                                                License
                                                                                                                                  Reuse

                                                                                                                                    gprof2dotby jrfonseca

                                                                                                                                    Python doticon star image 2742 doticonVersion:Currentdoticon License: Weak Copyleft (LGPL-3.0)

                                                                                                                                    Converts profiling output to a dot graph.
                                                                                                                                    Support
                                                                                                                                      Quality
                                                                                                                                        Security
                                                                                                                                          License
                                                                                                                                            Reuse

                                                                                                                                              rdflib: 

                                                                                                                                              • Is a Python library for working with Resource Description Framework RDF data.  
                                                                                                                                              • Offers a way to describe and link data across various applications and domains. 
                                                                                                                                              • Includes parsing RDF data from various serialization formats like Turtle, N-Triples, and RDF/XML. 
                                                                                                                                              • Supports the SPARQL query language, allowing you to query RDF data and retrieve subsets of the data. 

                                                                                                                                              rdflibby RDFLib

                                                                                                                                              Python doticonstar image 1910 doticonVersion:6.3.2doticon
                                                                                                                                              License: Permissive (BSD-3-Clause)

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

                                                                                                                                              Support
                                                                                                                                                Quality
                                                                                                                                                  Security
                                                                                                                                                    License
                                                                                                                                                      Reuse

                                                                                                                                                        rdflibby RDFLib

                                                                                                                                                        Python doticon star image 1910 doticonVersion:6.3.2doticon License: Permissive (BSD-3-Clause)

                                                                                                                                                        RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
                                                                                                                                                        Support
                                                                                                                                                          Quality
                                                                                                                                                            Security
                                                                                                                                                              License
                                                                                                                                                                Reuse

                                                                                                                                                                  pygraphistry: 

                                                                                                                                                                  • Is a Python library for visualizing large-scale graph data. 
                                                                                                                                                                  • Offers a way to transform and visualize graph data in a browser-based interface.  
                                                                                                                                                                  • Offers visualization options, including matrix views, scatter plots, and node-link diagrams.  
                                                                                                                                                                  • Allows interactive exploration with features like panning, filtering, and zooming. 

                                                                                                                                                                  pygraphistryby graphistry

                                                                                                                                                                  Python doticonstar image 1846 doticonVersion:0.11.8doticon
                                                                                                                                                                  License: Permissive (BSD-3-Clause)

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

                                                                                                                                                                  Support
                                                                                                                                                                    Quality
                                                                                                                                                                      Security
                                                                                                                                                                        License
                                                                                                                                                                          Reuse

                                                                                                                                                                            pygraphistryby graphistry

                                                                                                                                                                            Python doticon star image 1846 doticonVersion:0.11.8doticon License: Permissive (BSD-3-Clause)

                                                                                                                                                                            PyGraphistry is a Python library to quickly load, shape, embed, and explore big graphs with the GPU-accelerated Graphistry visual graph analyzer
                                                                                                                                                                            Support
                                                                                                                                                                              Quality
                                                                                                                                                                                Security
                                                                                                                                                                                  License
                                                                                                                                                                                    Reuse

                                                                                                                                                                                      asciichart: 

                                                                                                                                                                                      • Is a Python library for creating ASCII plots and charts.  
                                                                                                                                                                                      • Offers an easy-to-use API to generate simple plots and charts in a console or terminal with various chart types. 
                                                                                                                                                                                      • Supports various chart types like a bar, scatter plots, and line charts.   
                                                                                                                                                                                      • Offers the ability to customize the chart’s appearance, including size, font, and color. 

                                                                                                                                                                                      asciichartby kroitor

                                                                                                                                                                                      Python doticonstar image 1639 doticonVersion:Currentdoticon
                                                                                                                                                                                      License: Permissive (MIT)

                                                                                                                                                                                      Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies

                                                                                                                                                                                      Support
                                                                                                                                                                                        Quality
                                                                                                                                                                                          Security
                                                                                                                                                                                            License
                                                                                                                                                                                              Reuse

                                                                                                                                                                                                asciichartby kroitor

                                                                                                                                                                                                Python doticon star image 1639 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                                                                                                                                                Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
                                                                                                                                                                                                Support
                                                                                                                                                                                                  Quality
                                                                                                                                                                                                    Security
                                                                                                                                                                                                      License
                                                                                                                                                                                                        Reuse

                                                                                                                                                                                                          PGL: 

                                                                                                                                                                                                          • Is a Python library for building and training graph neural networks. 
                                                                                                                                                                                                          • Offers an easy-to-use API to work with large-scale graph data and implement state-of-the-art GNN models. 
                                                                                                                                                                                                          • Supports both supervised and unsupervised learning tasks.  
                                                                                                                                                                                                          • Supports GPU acceleration for efficient interface and training on large-scale graph data. 

                                                                                                                                                                                                          PGLby PaddlePaddle

                                                                                                                                                                                                          Python doticonstar image 1513 doticonVersion:2.2.5doticon
                                                                                                                                                                                                          License: Permissive (Apache-2.0)

                                                                                                                                                                                                          Paddle Graph Learning (PGL) is an efficient and flexible graph learning framework based on PaddlePaddle

                                                                                                                                                                                                          Support
                                                                                                                                                                                                            Quality
                                                                                                                                                                                                              Security
                                                                                                                                                                                                                License
                                                                                                                                                                                                                  Reuse

                                                                                                                                                                                                                    PGLby PaddlePaddle

                                                                                                                                                                                                                    Python doticon star image 1513 doticonVersion:2.2.5doticon License: Permissive (Apache-2.0)

                                                                                                                                                                                                                    Paddle Graph Learning (PGL) is an efficient and flexible graph learning framework based on PaddlePaddle
                                                                                                                                                                                                                    Support
                                                                                                                                                                                                                      Quality
                                                                                                                                                                                                                        Security
                                                                                                                                                                                                                          License
                                                                                                                                                                                                                            Reuse

                                                                                                                                                                                                                              Graphormer: 

                                                                                                                                                                                                                              • Helps build and train GNNs, which use transformers to process graph data.  
                                                                                                                                                                                                                              • Offers a framework to train GNN models which use transformers to process graph data.  
                                                                                                                                                                                                                              • Implements GNN models which use the transformer architecture like Graph-T5 and Graphormer.  
                                                                                                                                                                                                                              • Allowing easy integration with other deep and machine learning tools. 

                                                                                                                                                                                                                              Graphormerby microsoft

                                                                                                                                                                                                                              Python doticonstar image 1517 doticonVersion:Currentdoticon
                                                                                                                                                                                                                              License: Permissive (MIT)

                                                                                                                                                                                                                              Graphormer is a deep learning package that allows researchers and developers to train custom models for molecule modeling tasks. It aims to accelerate the research and application in AI for molecule science, such as material design, drug discovery, etc.

                                                                                                                                                                                                                              Support
                                                                                                                                                                                                                                Quality
                                                                                                                                                                                                                                  Security
                                                                                                                                                                                                                                    License
                                                                                                                                                                                                                                      Reuse

                                                                                                                                                                                                                                        Graphormerby microsoft

                                                                                                                                                                                                                                        Python doticon star image 1517 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                                                                                                                                                                                        Graphormer is a deep learning package that allows researchers and developers to train custom models for molecule modeling tasks. It aims to accelerate the research and application in AI for molecule science, such as material design, drug discovery, etc.
                                                                                                                                                                                                                                        Support
                                                                                                                                                                                                                                          Quality
                                                                                                                                                                                                                                            Security
                                                                                                                                                                                                                                              License
                                                                                                                                                                                                                                                Reuse

                                                                                                                                                                                                                                                  python-o365: 

                                                                                                                                                                                                                                                  • Is a Python wrapper for the Microsoft Graph API to interact with different Microsoft services. 
                                                                                                                                                                                                                                                  • Supports OneDrive, Microsoft Teams, Office 365, and SharePoint. 
                                                                                                                                                                                                                                                  • Supports authentication methods like Microsoft’s own authentication schema and OAuth2.  
                                                                                                                                                                                                                                                  • Is a useful tool for developers who want to interact with different Microsoft services. 
                                                                                                                                                                                                                                                  Python doticonstar image 1330 doticonVersion:v2.0doticon
                                                                                                                                                                                                                                                  License: Permissive (Apache-2.0)

                                                                                                                                                                                                                                                  A simple python library to interact with Microsoft Graph and Office 365 API

                                                                                                                                                                                                                                                  Support
                                                                                                                                                                                                                                                    Quality
                                                                                                                                                                                                                                                      Security
                                                                                                                                                                                                                                                        License
                                                                                                                                                                                                                                                          Reuse

                                                                                                                                                                                                                                                            python-o365by O365

                                                                                                                                                                                                                                                            Python doticon star image 1330 doticonVersion:v2.0doticon License: Permissive (Apache-2.0)

                                                                                                                                                                                                                                                            A simple python library to interact with Microsoft Graph and Office 365 API
                                                                                                                                                                                                                                                            Support
                                                                                                                                                                                                                                                              Quality
                                                                                                                                                                                                                                                                Security
                                                                                                                                                                                                                                                                  License
                                                                                                                                                                                                                                                                    Reuse

                                                                                                                                                                                                                                                                      GEM: 

                                                                                                                                                                                                                                                                      • Is the process of representing nodes in a graph as low-dimensional vectors in a continuous vector space.  
                                                                                                                                                                                                                                                                      • Is useful for many applications like node classification, graph visualization, and link prediction. 
                                                                                                                                                                                                                                                                      • Supports various graph embedding methods like DeepWalk, LINE, and Node2vec. 
                                                                                                                                                                                                                                                                      • Allows users to customize various parameters, like the number of walks, walk length, and dimensions. 

                                                                                                                                                                                                                                                                      GEMby palash1992

                                                                                                                                                                                                                                                                      Python doticonstar image 1215 doticonVersion:v1.0.1doticon
                                                                                                                                                                                                                                                                      License: Permissive (BSD-3-Clause)

                                                                                                                                                                                                                                                                      Support
                                                                                                                                                                                                                                                                        Quality
                                                                                                                                                                                                                                                                          Security
                                                                                                                                                                                                                                                                            License
                                                                                                                                                                                                                                                                              Reuse

                                                                                                                                                                                                                                                                                GEMby palash1992

                                                                                                                                                                                                                                                                                Python doticon star image 1215 doticonVersion:v1.0.1doticon License: Permissive (BSD-3-Clause)

                                                                                                                                                                                                                                                                                Support
                                                                                                                                                                                                                                                                                  Quality
                                                                                                                                                                                                                                                                                    Security
                                                                                                                                                                                                                                                                                      License
                                                                                                                                                                                                                                                                                        Reuse

                                                                                                                                                                                                                                                                                          See similar Kits and Libraries