Python Package Update Checker

0.18.0 · maintenance · verified Sat Apr 11

update-checker is a Python module (current version 0.18.0, last updated August 2020) that programmatically checks for updates to Python packages. It provides a simple API to determine if a newer version of a specified package is available. The library's release cadence appears to be infrequent, with the last update several years ago.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to instantiate the `UpdateChecker` and use its `check` method to query for available updates for a given package and its current version. The `result` object provides details about the update if one is found.

from update_checker import UpdateChecker

checker = UpdateChecker()
# Replace 'your_package_name' and '0.0.1' with actual package details
# For example, to check for updates to 'praw' with current version '0.0.1'
result = checker.check('praw', '0.0.1')

if result:
    # result is None when an update was not found or a failure occurred
    # result is an UpdateResult object with attributes like:
    # available_version, package_name, running_version, release_date
    print(f"An update is available for {result.package_name}!")
    print(f"Current version: {result.running_version}, Available version: {result.available_version}")
    if result.release_date:
        print(f"Release date of new version: {result.release_date}")
else:
    print("No update found or an error occurred.")

view raw JSON →