update_available¶
Return true if there is an update available.
An update is available if the version on PyPi is higher than the version the user has on their machine.
-
eldonationtracker.utils.update_available.
get_pypi_version
(url: str) → str¶ Use PyPi JSON API to get latest version.
- Returns
A string with the version number.
-
eldonationtracker.utils.update_available.
main
() → bool¶ Get the latest version on PyPi and compare to current version.
Made the decision to return false if the URL couldn’t be reached rather than make the user look for an update that might not be there.
- Returns
True if there’s an update available. False if up to date.
-
eldonationtracker.utils.update_available.
update_available
(pypi_version: str, current_version: str) → bool¶ Use semver module to calculate whether there is a newer version on PyPi.
- Returns
True if the PyPi version is higher than the version being run. Returns false if the version being compared to PyPi is equal or greater than the PyPi version.