types-networkx
Typing stubs for networkx
Decision gist · record as of 2026-08-14
Yes, if you use networkx and want static type checking. Install it alongside networkx to enable type checkers to validate your graph code. No downside if you don't use type checking—it has no runtime cost and no dependencies beyond numpy. Actively maintained, permissive license, and no known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; networkx itself must be installed separately for runtime use.
- Low friction installation with a single wheel distribution.
- Actively maintained as part of typeshed, with recent releases and no known vulnerabilities.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects without significant restrictions.
last release 2026-07-28 (17 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,708,678 downloads/mo, #3,630 on PyPI
Alternatives
Verify before relying
pip install types-networkx
import networkx as nx
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import types_networkx
G: nx.Graph = nx.Graph()
G.add_edge(1, 2)- Whether installing this package automatically enables type checking without additional mypy/pyright configuration.
- How frequently the stubs are updated relative to networkx releases.
What it is and what it does
types-networkx is a type stub package that provides type annotations for the networkx graph library. It allows static type checkers like mypy, pyright, and ty to understand and validate code that uses networkx, catching type errors before runtime. The stubs are maintained as part of the typeshed project and track networkx version 3.6.1.
This package has no runtime behavior—it exists purely to inform type checkers about networkx's API. It depends only on numpy and installs as a single wheel with low friction. The stubs have been tested against mypy 2.3.0, pyright 1.1.411, and ty 0.0.59, and the package is actively maintained with recent updates.
Use it for
- Enable mypy or pyright type checking in projects that use networkx for graph algorithms and analysis.
- Catch type errors in networkx code during development before they reach production.
- Provide IDE autocomplete and type hints for networkx functions and classes.
- Validate that graph construction and manipulation code conforms to expected types.
- Support continuous integration pipelines that enforce strict type checking on networkx-based code.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use networkx and want static type checking.
Install it alongside networkx to enable type checkers to validate your graph code. No downside if you don't use type checking—it has no runtime cost and no dependencies beyond numpy. Actively maintained, permissive license, and no known vulnerabilities.
Install
types-networkx on PyPI
Before you install
Low friction installation with a single wheel distribution. Actively maintained as part of typeshed, with recent releases and no known vulnerabilities.
Requires Python 3.10 or later; networkx itself must be installed separately for runtime use.
License in practice
Apache-2.0 permissive license allows use in most projects without significant restrictions.
Quickstart
pip install types-networkx
import networkx as nx
from typing import TYPE_CHECKING
if TYPE_CHECKING:
import types_networkx
G: nx.Graph = nx.Graph()
G.add_edge(1, 2)
Verify before relying
- Whether installing this package automatically enables type checking without additional mypy/pyright configuration.
- How frequently the stubs are updated relative to networkx releases.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,708,678 / month, #3,630 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_networkx-3.6.1.20260728-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 › “networkx type stubs”
- types-networkxProvides type stubs for networkx to enable static type checking of…
- types-assertpyProvides type stubs enabling static type checkers like mypy and…
- types-appdirsProvides type stubs for the appdirs package to enable static type…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also types-grpcio · types-geopandas · types-mypy-extensions · types-shapely · types-netaddr · types-gunicorn · types-braintree · types-pika-ts · types-tqdm · types-reportlab