{"id":27169,"library":"networkx-stubs","title":"networkx-stubs","description":"Type stubs for NetworkX, enabling static type checking. Current version 0.0.1, pre-release quality, low cadence.","status":"active","version":"0.0.1","language":"python","source_language":"en","source_url":"https://github.com/eggplants/networkx-stubs","tags":["networkx","type-stubs","typing"],"install":[{"cmd":"pip install networkx-stubs","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Graph","correct":"from networkx import Graph"}],"quickstart":{"code":"import networkx as nx\ng = nx.Graph()\ng.add_edge(1, 2)\nprint(g)\n","lang":"python","description":"Basic usage with NetworkX – stubs provide type hints."},"warnings":[{"fix":"Check stubs coverage manually or contribute missing stubs.","message":"Stubs may not cover all NetworkX functions or parameters; some type errors may be missed.","severity":"gotcha","affected_versions":"all"},{"fix":"Use with caution; consider using pyright or mypy without stubs as fallback.","message":"Version 0.0.1 is very early; expect incomplete or incorrect stubs.","severity":"gotcha","affected_versions":"0.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"networkx-stubs is not a separate package to import; install it via pip and it augments networkx stubs automatically.","cause":"Trying to import networkx-stubs directly as a package.","error":"Import 'networkx-stubs' could not be resolved"},{"fix":"Ensure both networkx and networkx-stubs are installed: pip install networkx networkx-stubs","cause":"Likely networkx not installed or wrong type stub version.","error":"Module 'networkx' has no attribute 'Graph'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}