deptry scans Python projects to identify dependency issues like unused or missing packages. It analyzes imported modules within files and compares them against the project's declared dependencies. This helps developers maintain clean and efficient projects by highlighting potential redundancies or omissions. deptry supports various dependency managers like Poetry, pip, and PDM, adhering to PEP 621.
deptry provides a comprehensive analysis of dependencies, catching errors often missed by standard linters. It is designed to seamlessly integrate into existing workflows with straightforward command-line usage or configuration. The tool’s focus on PEP 621 standards ensures compatibility with modern Python dependency management practices. Furthermore, its clear reporting facilitates quick identification and resolution of dependency problems.
- Dependency Scanning: Identifies unused, missing, and transitive dependencies across a Python project.
- Multiple Manager Support: Works with Poetry, pip, PDM, uv, and other dependency management tools.
- Command-Line Interface: Offers a simple command-line interface for easy integration into build and testing pipelines.
- Configuration Options: Supports configuration via command-line arguments and
pyproject.tomlfor customized behavior. - PEP 621 Compliance: Adheres to the PEP 621 specification for dependency declaration and management.
- Detailed Reporting: Provides clear and concise reports on identified dependency issues with file and line number information.
- Virtual Environment Focused: Designed to function effectively within project-specific virtual environments.
deptry is an active project with regular updates and a growing community. The project has a history of releases and ongoing maintenance, indicated by recent commits and issue resolution. Comprehensive documentation and a dedicated website contribute to its accessibility and usability. The project's stability is supported by its active development and adherence to best practices.
Developers benefit from deptry by simplifying dependency management and improving code quality. It addresses common problems arising from forgotten dependencies or unnecessary packages, leading to more maintainable and performant projects. By providing clear insights into project dependencies, deptry offers a valuable alternative to manual dependency audits or relying solely on linters.
