Welcome to Dependency Check Utility’s documentation!¶
Python Dependency Check Utility
This script is a command-line utility that compares defined packages from a requirements.txt file to the latest stable version on the PyPI index.
- Usage:
dependency_check.py [options] <requirements_file>
- Options:
- -h, --help
Show this help message and exit.
- -o OUTPUT, --output=OUTPUT
Specify an output file or folder to write the results (CSV format).
- dependency_check.compare_packages(requirements_file: str, output_file: str = '') None ¶
Function to check packages in a requirements file against the latest stable version on the pip index
- Parameters:
requirements_file (str) – properly formatted requirements.txt file
output_file (str) – location to write CSV output file
- dependency_check.compare_versions(current_version: str, latest_version: str) str ¶
Helper function to compare versions and categorize result
- Parameters:
current_version (str) – Current package semantic version number
latest_version (str) – Latest pypi package semantic version number
- Returns:
Categorized result of comparison (match, major, minor, etc)
- Return type:
str
- dependency_check.main() None ¶
Main function to capture arguments and