networkx
Python package for creating and manipulating graphs and networks
Decision gist · record as of 2026-08-14
Yes. NetworkX is a foundational, production-stable library with no security vulnerabilities, zero runtime dependencies, and active maintenance. It ranks in the top 1000 PyPI packages by downloads and supports current Python versions. Install it whenever you need to work with graphs, networks, or graph algorithms—it's the standard choice in the Python ecosystem for this domain.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later (3.14.1 excluded); check your environment before installing.
- Low install friction with a pure Python wheel distribution.
- The package is actively maintained with recent releases and has no runtime dependencies, making it straightforward to add to any Python project.
License · maintenance · safety
BSD-3-Clause (permissive) — Released under the 3-clause BSD license, a permissive license that allows commercial and private use with minimal restrictions—you can use, modify, and distribute NetworkX freely as long as you retain the copyright notice.
last release 2025-12-08 (249 days) · last repo commit 2026-08-14 · 17,190 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 290,866,406 downloads/mo, #141 on PyPI
Alternatives
Verify before relying
pip install networkx
import networkx as nx
G = nx.Graph()
G.add_edge("A", "B", weight=4)
G.add_edge("B", "D", weight=2)
G.add_edge("A", "C", weight=3)
G.add_edge("C", "D", weight=4)
print(nx.shortest_path(G, "A", "D", weight="weight"))- Whether optional dependencies (referenced as networkx[default]) are needed for your specific use case.
- Performance characteristics for very large graphs (millions of nodes/edges).
What it is and what it does
NetworkX is a mature Python library for working with graphs and networks of all kinds—from social networks to biological systems to infrastructure models. It provides a rich set of data structures (Graph, DiGraph, MultiGraph, etc.) and a comprehensive algorithm library covering shortest paths, centrality measures, clustering, connectivity, and more. The package has no runtime dependencies, making it lightweight to install and integrate into existing projects.
Typical workflows involve constructing a graph by adding nodes and edges, optionally with attributes or weights, then running algorithms to extract insights about structure, connectivity, or flow. NetworkX is widely used in research, data science, and systems analysis where understanding network topology and dynamics is central to the problem.
Use it for
- Find shortest routes or optimal paths in transportation, logistics, or routing networks.
- Analyze social networks to identify influential nodes, communities, or information flow patterns.
- Study biological networks such as protein interactions or gene regulatory systems.
- Model and simulate infrastructure systems like power grids or water distribution networks.
- Compute centrality measures to rank nodes by importance in any graph-based system.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
NetworkX is a foundational, production-stable library with no security vulnerabilities, zero runtime dependencies, and active maintenance. It ranks in the top 1000 PyPI packages by downloads and supports current Python versions. Install it whenever you need to work with graphs, networks, or graph algorithms—it's the standard choice in the Python ecosystem for this domain.
Install
networkx on PyPI
Before you install
Low install friction with a pure Python wheel distribution. The package is actively maintained with recent releases and has no runtime dependencies, making it straightforward to add to any Python project.
Requires Python 3.11 or later (3.14.1 excluded); check your environment before installing.
License in practice
Released under the 3-clause BSD license, a permissive license that allows commercial and private use with minimal restrictions—you can use, modify, and distribute NetworkX freely as long as you retain the copyright notice.
Quickstart
pip install networkx
import networkx as nx
G = nx.Graph()
G.add_edge("A", "B", weight=4)
G.add_edge("B", "D", weight=2)
G.add_edge("A", "C", weight=3)
G.add_edge("C", "D", weight=4)
print(nx.shortest_path(G, "A", "D", weight="weight"))
Verify before relying
- Whether optional dependencies (referenced as networkx[default]) are needed for your specific use case.
- Performance characteristics for very large graphs (millions of nodes/edges).
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release !=3.14.1,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 249 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 290,866,406 / month, #141 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: MathematicsTopic :: Scientific/Engineering :: PhysicsTopic :: Software Development :: Libraries :: Python Modules |
Evidence: networkx-3.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “graph theory implementation”
- networkxNetworkX provides data structures and algorithms for creating,…
- rustworkxA high-performance graph library for Python, written in Rust,…
- python-igraphPython interface to the igraph graph library for network analysis and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also igraph · python-igraph · dwave-networkx · pygraphviz · retworkx · rustworkx · scikit-network · altgraph · cityseer · leidenalg