Skip to main content

Logo

PyPI version Documentation Status Build and Test Codecov Language grade: Python Downloads MIT license

check4updates is a Python package designed for developers to provide a reliable, simple, and unobtrusive way to check whether their users have the most recent release of their package installed and prompt users when an update is available.

It is recommended that check4updates be placed in your package’s __init__.py file so that it is called every time the package is used. To minimise runtime, check4updates only checks online if certain conditions are met, such as sufficient time since the last check. This ensures that incorporating check4updates into your Python package will have a negligible (<0.01sec) effect on the time it takes users to import something from your package (which is when __init__.py is called) and no impact on any of the functions within your package.

When check4updates does check online, it searches PyPI for the most recent release (based on version number) and compares that value with the version installed on the user’s system. If certain conditions are met, the user is then prompted to install the updated version which must be done by the user in a separate command so as not to interrupt the currently executing script. Users can choose to upgrade now, skip this version, be reminded later, or never be asked again and check4updates will remember this choice and act accordingly.

Documentation

Detailed documentation and examples are available at readthedocs.

Design principles

  • periodically check for updates without user action and without slowing down the parent script
  • only prompt the user when necessary
  • give the user the option to update now, be reminded later, skip this version, or never be asked again
  • handle all errors silently to prevent the parent script from being impacted

Usage

To use check4updates, place the following lines in your package's __init__.py file:

from check4updates import check_and_prompt
check_and_prompt("your_package")

It is as simple as that and check4updates will do the rest!

Contact

If you find any errors, have any suggestions, or would like to request that something be added, please email alpha.reliability@gmail.com.

If you would like to receive an email notification when a new release of check4updates is uploaded to PyPI, NewReleases.io provides this service for free.

Metadata

Release files for check4updates 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for check4updates 0.0.2
File Size Uploaded
check4updates-0.0.2.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for check4updates 0.0.2
File Interpreter ABI Platform
check4updates-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / check4updates-0.0.2.tar.gz

Download URL check4updates-0.0.2.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
46097c275850af58abb8b906549a79f1e8520d5f20e07f1ff4b93bebbfc9ad9c
BLAKE2b-256 checksum
How to use checksums
4f090d8ece40fd813c5f933a2d90a86f12bbaedc159037300855ba89399621b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / check4updates-0.0.2-py3-none-any.whl

Download URL check4updates-0.0.2-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ee42c8f3027620f23a003f08061b1aa51ddf31cc3d85dc800a338f9766eb129
BLAKE2b-256 checksum
How to use checksums
aeeb7941bbcee49e5750628c5acb7e26035a3b1de9ce6807d3b12a47ea1f0866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page