check_for_update
tit.tools.check_for_update ¶
Check for new TI-Toolbox releases on GitHub.
Queries the GitHub Releases API and compares the latest published tag against the running version. Designed for non-blocking startup checks.
Usage¶
from tit.tools.check_for_update import check_for_new_version newer = check_for_new_version("2.2.0") if newer: ... print(f"Update available: {newer}")
parse_version ¶
Parse a version string into a tuple of integers.
Leading v prefixes and non-numeric suffixes are stripped so that
both "2.2.1" and "v2.2.1" produce (2, 2, 1).
Parameters¶
version_str : str
Dotted version string, e.g. "v2.2.1".
Returns¶
tuple of int Numeric version components.
Source code in tit/tools/check_for_update.py
check_for_new_version ¶
check_for_new_version(current_version: str, repo: str = 'idossha/TI-Toolbox', timeout: float = 2.0) -> str | None
Check GitHub for the latest release.
Parameters¶
current_version : str
The running version string (e.g. "2.2.0").
repo : str, optional
GitHub owner/repo slug.
timeout : float, optional
HTTP request timeout in seconds.
Returns¶
str or None
The latest version string if a newer release exists, otherwise
None.
Raises¶
requests.HTTPError If the GitHub API request fails.