import-linter
Lint your Python architecture
Decision gist · record as of 2026-08-14
Yes. Import Linter is production-stable, actively maintained, has no known vulnerabilities, and solves a real problem—keeping Python module dependencies clean and intentional. The low install friction and permissive license make it a straightforward addition to any project that values architectural clarity. Install it if you want to enforce import rules or explore package structure.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction installation with a pure-Python wheel and minimal dependencies.
- Active maintenance with a recent release (42 days ago) and steady community interest (1135 stars).
License · maintenance · safety
BSD 2-Clause License (permissive) — BSD 2-Clause License is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license text.
last release 2026-07-03 (42 days) · last repo commit 2026-08-11 · 1,135 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,487,925 downloads/mo, #1,279 on PyPI
Alternatives
Verify before relying
pip install import-linter
import_linter lint- Whether the browser UI requires additional system dependencies or a running server process beyond the CLI.
- Performance characteristics when analyzing large Python codebases or deeply nested package structures.
What it is and what it does
Import Linter is a linting tool that lets you define and enforce rules about which Python modules can import from which other modules. Instead of discovering architectural violations at runtime or code review, you declare your intended module boundaries upfront—for example, 'domain logic must not import from UI'—and the linter checks your codebase against those rules. It's useful for maintaining clean separation of concerns in larger projects.
Beyond the command-line linter, it includes a browser-based interface for exploring your package's import graph interactively. The tool depends on click for CLI handling, grimp for import graph analysis, rich for terminal output formatting, tomli for configuration parsing, and typing-extensions for type hints. It requires Python 3.10 or later and runs on Windows, POSIX, and Unix systems.
Use it for
- Enforce layered architecture rules (e.g., controllers cannot import from models directly) in a web framework project.
- Prevent circular dependencies by declaring which modules are allowed to depend on which others.
- Visualize and explore the import graph of an unfamiliar Python package to understand its structure.
- Integrate import linting into CI/CD pipelines to catch architectural violations before merge.
- Document intended module boundaries as executable constraints rather than prose guidelines.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Import Linter is production-stable, actively maintained, has no known vulnerabilities, and solves a real problem—keeping Python module dependencies clean and intentional. The low install friction and permissive license make it a straightforward addition to any project that values architectural clarity. Install it if you want to enforce import rules or explore package structure.
Install
import-linter on PyPI
Before you install
Low friction installation with a pure-Python wheel and minimal dependencies. Active maintenance with a recent release (42 days ago) and steady community interest (1135 stars).
Requires Python 3.10 or later.
License in practice
BSD 2-Clause License is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license text.
Quickstart
pip install import-linter
import_linter lint
Verify before relying
- Whether the browser UI requires additional system dependencies or a running server process beyond the CLI.
- Performance characteristics when analyzing large Python codebases or deeply nested package structures.
Package facts
| License | BSD 2-Clause License permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesclickgrimprichtomlityping-extensions |
| Maintenance | Actively maintained 42 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,487,925 / month, #1,279 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 :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Utilities |
Evidence: import_linter-2.13-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 constraints”
- import-linterImport Linter enforces architectural constraints on Python module…
- lazy-loaderLazy-loader defers the import of subpackages and external libraries…
- pyddqPyDDQ is a Python API for running data quality constraint checks on…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities 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.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
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.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also PyTestArch · tach · pytest-archon · lintrunner · pysen · gitlint-core · grimp · lintrunner-adapters · pylint-quotes · strict-kwargs