Centralized update checking library for HenriquesLab Python packages.
- 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
packagingrequired, optionalrichandhttpxfor enhanced features
pip install henriqueslab-updaterWith optional dependencies:
pip install henriqueslab-updater[all] # includes rich and httpx
pip install henriqueslab-updater[rich] # just rich formattingfrom 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()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()- Homebrew (
brew) - pipx
- uv tools
- pip (user and system installs)
- Development (git clone + editable install)
Environment variables:
NO_UPDATE_NOTIFIER=1- Disable all update checks{PACKAGE}_NO_UPDATE_CHECK=1- Disable for specific package
MIT License - see LICENSE file for details.
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