importlab
A library to calculate python dependency graphs.
Decision gist · record as of 2026-08-14
Yes, if you need import graph analysis for a static analysis tool and can tolerate an unmaintained package. The library is stable and has no known vulnerabilities, but the abandoned status means no future updates or support. Suitable for projects that have already integrated it or need this specific functionality and can accept the maintenance risk.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later.
- The package is archived and unmaintained, so compatibility with future Python versions is not guaranteed.
- Low friction to install.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), so you can use it freely in commercial and private projects without restriction, though you must include a copy of the license.
last release 2023-10-06 (1043 days) · last repo commit 2024-05-03 · 179 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,023,847 downloads/mo, #4,489 on PyPI
Alternatives
Verify before relying
pip install importlab
import importlab.pyxref
graph = importlab.pyxref.ImportGraph(['myfile.py'])
for node in graph.OrderedNodes():
print(node)- Whether the package works reliably with modern Python versions (3.10+) given its abandoned status
- Whether networkx dependency version constraints are compatible with current ecosystem versions
- Specific API surface and available methods beyond what the description excerpt documents
What it is and what it does
Importlab is a library that analyzes Python source files to automatically infer their import dependencies and construct a dependency graph. It is designed primarily as a library for static analysis tools that need to process files in a specific order—ensuring each file's dependencies are analyzed before the file itself. The package includes cycle detection and ships with a command-line tool for inspecting import information.
The library depends only on networkx for graph operations and has low installation friction. However, the project is archived and abandoned, with no updates since 2024-05-03 and no active maintenance. While it remains functional for its original purpose, users should be aware that bugs will not be fixed and compatibility with future Python versions is uncertain.
Use it for
- Integrate with static analysis tools to ensure files are processed in correct dependency order
- Detect circular imports in a Python codebase to identify problematic dependency patterns
- Generate import dependency graphs for visualization or documentation of project structure
- Determine optimal file processing order for batch analysis tools that work on one file at a time
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need import graph analysis for a static analysis tool and can tolerate an unmaintained package.
The library is stable and has no known vulnerabilities, but the abandoned status means no future updates or support. Suitable for projects that have already integrated it or need this specific functionality and can accept the maintenance risk.
Install
importlab on PyPI
Before you install
Low friction to install. The package is abandoned (last commit 2024-05-03, repository archived) and has not been updated in over a year, so expect no maintenance or bug fixes going forward.
Requires Python 3.6 or later. The package is archived and unmaintained, so compatibility with future Python versions is not guaranteed.
License in practice
Licensed under Apache 2.0 (permissive), so you can use it freely in commercial and private projects without restriction, though you must include a copy of the license.
Quickstart
pip install importlab
import importlab.pyxref
graph = importlab.pyxref.ImportGraph(['myfile.py'])
for node in graph.OrderedNodes():
print(node)
Verify before relying
- Whether the package works reliably with modern Python versions (3.10+) given its abandoned status
- Whether networkx dependency version constraints are compatible with current ecosystem versions
- Specific API surface and available methods beyond what the description excerpt documents
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.6.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenetworkx |
| Maintenance | Abandoned 1,043 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 1,023,847 / month, #4,489 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development |
Evidence: importlab-0.8.1-py2.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 › “python import dependency graph”
- importlabImportlab infers Python import dependencies and builds a dependency…
- modulegraphmodulegraph analyzes Python module dependencies by examining bytecode…
- modulegraph2Modulegraph2 builds and introspects a dependency graph of Python…
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 py-import-cycles · pipdeptree · import-deps · pydeps · mo-imports · cyclic · igraph · altgraph · rainflow · objgraph