A dependency linter for Python projects. Define rules for which modules can depend on what, and catch violations.
pip install python-dependency-linterOr with uv:
uv add python-dependency-linterCreate .python-dependency-linter.yaml in your project root:
rules:
- name: domain-isolation
modules: contexts.*.domain
description: Domain layer must not depend on application or infrastructure
allow:
standard_library: [dataclasses, typing]
third_party: [pydantic]
local: [contexts.*.domain]Run:
pdl checkFor full documentation, visit heumsi.github.io/python-dependency-linter.
MIT