--- id: importlab version: "0.8.1" license: Apache 2.0 license_treatment: permissive maintenance: abandoned --- # importlab — A library to calculate python dependency graphs. License: permissive · Maintenance: abandoned · Downloads: 1.0M/mo ## 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 above — verify before relying. Importlab infers Python import dependencies and builds a dependency graph, enabling tools to process files in dependency order and detect import cycles. 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 pip install importlab uv add importlab poetry add importlab ## Installing importlab 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. 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) Requires Python 3.6 or later. The package is archived and unmaintained, so compatibility with future Python versions is not guaranteed. 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_current - Install friction: low - Maintenance: abandoned - Downloads: 1.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python import dependency graph, static analysis file ordering, import cycle detection, python dependency inference, import graph analysis, static-analysis, dependency-graph, abandoned [View on SkillFed](https://skillfed.io/packages/importlab) · [View on PyPI](https://pypi.org/project/importlab/)