Skip to main content

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

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.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

dependency_checker-0.0.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dependency_checker-0.0.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for dependency_checker-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1b87c29a027162be3dc5d0db2bb67a4d303953762294ef7b8649546147631d47
MD5 fc66309570268247de20da5f8438b854
BLAKE2b-256 eb20b7bd21b3200116ce9cd01fa50d0e423484ffceaf7c1b07fb82c6a6642bd2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dependency_checker-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for dependency_checker-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3675f309ca4374d0dc7b6f34168046e58f5c1187c4ed59c342ed7836efd703d
MD5 d4c4bd171ac56465f3fb41faed3bdc46
BLAKE2b-256 ad79fe0673c45b615ad6b0f2e75d3783a323a8e9c41d1dd2d072823f4aa2eef0

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