Skip to main content

A lightweight pythonic way to check if a package's dependencies are out of date

Reason this release was yanked:

Bug

Project description

Dependency Checker

A lightweight pythonic way to verify if python packages are on the latest version

Install

pip install dependency-checker

How to use

from dependency_checker import get_installed_dependencies, is_latest_version

dependency_checker has two functionalities:

  • Checking a python project's dependencies
  • Checking if a python package is on the latest version

Each are intuitive to use, and have detailed documentation available.

To check a package's dependencies, we can use the get_installed_dependencies function, passing in the string name of the module:

get_installed_dependencies('dependency-checker', depth_limit=1)
{'packaging': '21.0', 'pip': '21.2.4', 'pipdeptree': '2.1.0'}

Generally a depth of 1 is enough to get a package's main dependencies, bar pip, packaging, and other "standard" python resources.

If we also want to include the original package, we can pass that in as a parameter:

get_installed_dependencies('dependency-checker', depth_limit=1, include_self=True)
{'dependency-checker': '0.0.1',
 'packaging': '21.0',
 'pip': '21.2.4',
 'pipdeptree': '2.1.0'}

There also exists is_latest_version, which will see if a package version is the latest available on pypi:

is_latest_version('pipdeptree', '2.0.9')
False

Automatically Building a requirements.txt file

You can also use dependency_checker to automatically build a requirements file from the command-line. It is an extension of pipreqs, combining both our functionalities together to give a more fine-grained and stable text file.

To read more, see the documentation here

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

dependency_checker-0.0.4.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

dependency_checker-0.0.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file dependency_checker-0.0.4.tar.gz.

File metadata

  • Download URL: dependency_checker-0.0.4.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for dependency_checker-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9f1997913bdc3c9d96261c939f68e0ea40bbc65e91c0e8737792fe5b7a28cd74
MD5 1a38681d64572ace70801474f21a2660
BLAKE2b-256 f0a9273c0c398e5b21b241f43d96e50e89ae690a866331427d782ff52ddb014a

See more details on using hashes here.

File details

Details for the file dependency_checker-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for dependency_checker-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7eb7c2c677899e6a0f4fdfe5aab6ebffb964c4168ba710d8b7fb56ce0971243
MD5 4cdc0b27b515cef6aaf4403575d68a51
BLAKE2b-256 e2cda07e889fa37238a85f5eee3ca28ca331b0a0ac5f0106d20a9d07cb716ec3

See more details on using hashes here.

Supported by

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