Skip to main content

Find undeclared and unused 3rd-party dependencies in your Python project.

Project description

PyPI Latest Release Supported Python versions Build Licence Code of conduct Discord channel

FawltyDeps

FawltyDeps is a dependency checker for Python that finds undeclared and/or unused 3rd-party dependencies in your Python project. The name is inspired by the Monty Python-adjacent Fawlty Towers sitcom.

📝 Full documentation available at: tweag.github.io/FawltyDeps

FawltyDeps demo

We invite you to join our Discord channel! It's a great place to ask questions, share your ideas, and collaborate with other contributors.

Key Concepts

  • undeclared dependency: a package that's used (in particular, imported) by a project and which lacks a corresponding declaration to ensure that it's available. For example, you import numpy, but you've forgotten to include numpy in your requirements.txt. Pragmatically, this means the project is prone to runtime errors.
  • unused dependency: a package that's declared as necessary for a project but which is never used by project code. For example, you have numpy listed in your requirements.txt, but you never actually import numpy. Pragmatically, this means that project installation may consume more space than needed and will be more likely to break with future software releases; in short, these are costs paid for no benefit.

Your project dependencies may look like this:

But FawltyDeps is all about helping you get to this perfect green spot:

Installation

The library is distributed with PyPI, so simply:

pip install fawltydeps

or any other way to install Python packages from PyPI should be enough to make it available in your environment.

Consider adding fawltydeps to your development dependencies, to help you catch undeclared and unused dependencies in your projects.

Usage

To check the project in the current directory run:

fawltydeps

This will find imports in all the Python code under the current directory, extract dependencies declared by your project, and then report undeclared and unused dependencies.

Development

For details on setting up your development environment, please refer to the contributing guidelines of how to set up your development environment in our CONTRIBUTING.md file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fawltydeps-0.19.0.tar.gz (48.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fawltydeps-0.19.0-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

Details for the file fawltydeps-0.19.0.tar.gz.

File metadata

  • Download URL: fawltydeps-0.19.0.tar.gz
  • Upload date:
  • Size: 48.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.6.63

File hashes

Hashes for fawltydeps-0.19.0.tar.gz
Algorithm Hash digest
SHA256 0fbe9b1736f3a1c7060d5b3489e24f594187a0c98afa5ea888b27e70e63b0ae0
MD5 29f150acbfdfe5d9d6c251ea5babe767
BLAKE2b-256 dc6d36114743a9ee46b7c3eb31f00ec13746cfb5f33da38b6ab08e84c0eb3357

See more details on using hashes here.

File details

Details for the file fawltydeps-0.19.0-py3-none-any.whl.

File metadata

  • Download URL: fawltydeps-0.19.0-py3-none-any.whl
  • Upload date:
  • Size: 55.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.6.63

File hashes

Hashes for fawltydeps-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbdd3da5620dd3c6b12a8c00ac655d17376aacf6d105fa61fe44fa4fa195baed
MD5 e1843de59d00357ef3c8f17c5e065d5b
BLAKE2b-256 58c8581e08c6d7ead9e4fa9e7ad858609d726687764a83a517f7dac2d904a114

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page