Skip to main content

Centralized update checking library for HenriquesLab Python packages

Project description

henriqueslab-updater

Centralized update checking library for HenriquesLab Python packages.

Features

  • Multi-source version checking: PyPI, Homebrew, GitHub formulas
  • Installation method detection: Automatically detects Homebrew, pipx, uv, pip (user/system), and development installations
  • Smart caching: 24-hour TTL to avoid excessive network requests
  • Non-blocking: Background checks that don't disrupt CLI execution
  • Pluggable architecture: Customizable version sources, notifiers, and plugins
  • Optional changelog integration: Display changelog highlights in update notifications
  • Minimal dependencies: Only packaging required, optional rich and httpx for enhanced features

Installation

pip install henriqueslab-updater

With optional dependencies:

pip install henriqueslab-updater[all]  # includes rich and httpx
pip install henriqueslab-updater[rich]  # just rich formatting

Quick Start

from henriqueslab_updater import UpdateChecker

# Simple usage
checker = UpdateChecker(
    package_name="your-package",
    current_version="1.0.0",
)

# Start background check (non-blocking)
checker.check_async()

# Later, show notification if available
checker.show_notification()

Advanced Usage

from henriqueslab_updater import (
    UpdateChecker,
    ChangelogPlugin,
    RichNotifier,
)

checker = UpdateChecker(
    package_name="your-package",
    current_version="1.0.0",
    notifier=RichNotifier(title="Update Available"),
    plugins=[
        ChangelogPlugin(
            changelog_url="https://raw.githubusercontent.com/org/repo/main/CHANGELOG.md",
            highlights_per_version=3,
        ),
    ],
)

checker.check_async()
checker.show_notification()

Supported Installation Methods

  • Homebrew (brew)
  • pipx
  • uv tools
  • pip (user and system installs)
  • Development (git clone + editable install)

Configuration

Environment variables:

  • NO_UPDATE_NOTIFIER=1 - Disable all update checks
  • {PACKAGE}_NO_UPDATE_CHECK=1 - Disable for specific package

License

MIT License - see LICENSE file for details.

Development

git clone https://github.com/HenriquesLab/henriqueslab-updater.git
cd henriqueslab-updater
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[all,dev]"
pytest

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

henriqueslab_updater-1.1.3.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

henriqueslab_updater-1.1.3-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

Details for the file henriqueslab_updater-1.1.3.tar.gz.

File metadata

  • Download URL: henriqueslab_updater-1.1.3.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for henriqueslab_updater-1.1.3.tar.gz
Algorithm Hash digest
SHA256 a9202dac1e3027f4e4ac9c541e8c4444e9ca8ae8dac88e5fb4613057ab97baf2
MD5 16a831e1dcc6ca91e1fd358339761e66
BLAKE2b-256 c82ab22f185e11df6c7eff73a5d0c6b904c903bf3c1e446ec340704b43cdddb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for henriqueslab_updater-1.1.3.tar.gz:

Publisher: publish-to-pypi.yml on HenriquesLab/henriqueslab-updater

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file henriqueslab_updater-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for henriqueslab_updater-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a875e6c89f208fdad0eb157399bf52e8ab48124f9efc062b5b2fadad0cb1e4d
MD5 3d5460a347bf63e7036161467d04c37b
BLAKE2b-256 57277dada836eba628b6f8ccdf2fc4e4752cde83e459ff2978521abf06746f30

See more details on using hashes here.

Provenance

The following attestation bundles were made for henriqueslab_updater-1.1.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on HenriquesLab/henriqueslab-updater

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page