outdated

raw JSON →
0.2.2 verified Mon Apr 27 auth: no python

A Python library to check if a version of a PyPI package is outdated. Current version: 0.2.2. Release cadence: infrequent, last updated in 2020.

pip install outdated
error ModuleNotFoundError: No module named 'outdated'
cause The package is not installed.
fix
Run 'pip install outdated'.
error AttributeError: module 'outdated' has no attribute 'check_outdated'
cause Incorrect import or outdated library version.
fix
Ensure you have version 0.2.0 or later and use 'from outdated import check_outdated'.
gotcha The function check_outdated makes a network request to PyPI. Ensure internet connectivity; otherwise, it may raise a ConnectionError.
fix Handle exceptions gracefully, e.g., using try/except.
gotcha The check is based on the local version string you provide. If you provide a malformed version (e.g., '0.2.2a'), it may not parse correctly.
fix Use a valid PEP 440 version string.

Check if a specific version of a package is outdated.

from outdated import check_outdated

package = 'outdated'
current_version = '0.2.2'
is_outdated, latest_version = check_outdated(package, current_version)
if is_outdated:
    print(f"Package {package} is outdated. Latest version: {latest_version}")
else:
    print(f"Package {package} is up to date.")