Package: version-tracker
version-trackerQuery PyPI for critical updates available available for your users installation of your package.DetailsImport this Python package into your Python packages to query PyPI for critical updates to your package.This is particularly useful when you would like to notify your users that the version of your package,
that they have installed has critical updates that they should update their package.RequirementsYour package must follow Semantic Versioning.Given a version number MAJOR.MINOR.PATCH, increment the:MAJOR version when you make incompatible API changesMINOR version when you add functionality in a backward compatible mannerPATCH version when you make backward compatible bug fixesAPIsHigh Level APIdefget_update_notification(pkg_name:str,severity_level:int=2)->str:Low Level APIdefquery(pkg_name:str)->dict[str,str]:How to use version-trackerAdd version-tracker to the list of your package’s dependencies.# Update your SETUP.PY to include version-tracker as shown:INSTALL_REQUIRES=["aiohttp>=3.7.4","psutil","aiohttp_session[secure]","version-tracker",]Include the module from your source code and use the APIs provided. See example below:importversion_trackerlogger.info("==============")# Get the name of your own packagepackage_name=str(__name__).split(".")[0]# Returns a pre-formatted string for use with any logging information, that can be used to warn users of available updates.logger.info("HIGH SEVERITY LEVEL log:")logger.info(version_tracker.get_update_notification(package_name,version_tracker.HIGH_SEVERITY_LEVEL))logger.info("MEDIUM SEVERITY LEVEL log:")logger.info(version_tracker.get_update_notification(package_name,version_tracker.MEDIUM_SEVERITY_LEVEL))logger.info("LOW SEVERITY LEVEL log:")logger.info(version_tracker.get_update_notification(package_name,version_tracker.LOW_SEVERITY_LEVEL))# Low Level API:# Returns version information about the current package.version_info=version_tracker.query(package_name)# version_info is a Dictionary with the following information:#  "latest": latest_version,#  "is_major": str(major_update),#  "is_minor": str(minor_update),#  "is_patch": str(patch_update),#  "commit_messages": commit_msg,# Shows the latest version of your package that is available on PyPIprint(version_info["latest"])# Shows whether the updates on PyPI are major in Nature. ie: Update found in the MAJOR portion of the Semantic version.print(version_info["is_major"])# Shows any available commit messages related the updates between installed version and latest version.print(version_info["commit_messages"])logger.info("==============")Sample output from a package that is using the Above APIs and run on an installation which has version 0.1.0, but PyPI has version 0.10.0 installedINFO:MATLABProxyApp:HIGHSEVERITYLEVELlog:severity_levelrequested:2Localversionfoundfor[matlab_proxy]is:[0.1.0]fetching:https://api.github.com/repos/mathworks/matlab-proxy/releases/tags/v0.10.0INFO:MATLABProxyApp:====!!!!ATTENTION!!!!====MajorUpdaterequiredformatlab_proxy.Considerupdatingtov0.10.0.Commitmessageofv0.10.0:Containsmultiplebugfixesandcriticalvulnerabilitypatches.Alsointroducestheabilitytocontrolthetimeforwhichmatlab-proxywaitsbeforetimingout.SeeMWI_PROCESS_START_TIMEOUTin[Advanced-Usage.md](https://github.com/mathworks/matlab-proxy/blob/main/Advanced-Usage.md).**FullChangelog**:https://github.com/mathworks/matlab-proxy/compare/v0.9.1...v0.10.0====!!!!ATTENTION!!!!====INFO:MATLABProxyApp:MEDIUMSEVERITYLEVELlog:severity_levelrequested:1Localversionfoundfor[matlab_proxy]is:[0.1.0]fetching:https://api.github.com/repos/mathworks/matlab-proxy/releases/tags/v0.10.0INFO:MATLABProxyApp:====!!!!ATTENTION!!!!====MajorUpdaterequiredformatlab_proxy.Considerupdatingtov0.10.0.Commitmessageofv0.10.0:Containsmultiplebugfixesandcriticalvulnerabilitypatches.Alsointroducestheabilitytocontrolthetimeforwhichmatlab-proxywaitsbeforetimingout.SeeMWI_PROCESS_START_TIMEOUTin[Advanced-Usage.md](https://github.com/mathworks/matlab-proxy/blob/main/Advanced-Usage.md).**FullChangelog**:https://github.com/mathworks/matlab-proxy/compare/v0.9.1...v0.10.0====!!!!ATTENTION!!!!====INFO:MATLABProxyApp:LOWSEVERITYLEVELlog:severity_levelrequested:0Localversionfoundfor[matlab_proxy]is:[0.1.0]fetching:https://api.github.com/repos/mathworks/matlab-proxy/releases/tags/v0.10.0INFO:MATLABProxyApp:====!!!!ATTENTION!!!!====MajorUpdaterequiredformatlab_proxy.Considerupdatingtov0.10.0.Commitmessageofv0.10.0:Containsmultiplebugfixesandcriticalvulnerabilitypatches.Alsointroducestheabilitytocontrolthetimeforwhichmatlab-proxywaitsbeforetimingout.SeeMWI_PROCESS_START_TIMEOUTin[Advanced-Usage.md](https://github.com/mathworks/matlab-proxy/blob/main/Advanced-Usage.md).**FullChangelog**:https://github.com/mathworks/matlab-proxy/compare/v0.9.1...v0.10.0====!!!!ATTENTION!!!!====Localversionfoundfor[matlab_proxy]is:[0.1.0]fetching:https://api.github.com/repos/mathworks/matlab-proxy/releases/tags/v0.10.00.10.0FalseContainsmultiplebugfixesandcriticalvulnerabilitypatches.Alsointroducestheabilitytocontrolthetimeforwhichmatlab-proxywaitsbeforetimingout.SeeMWI_PROCESS_START_TIMEOUTin[Advanced-Usage.md](https://github.com/mathworks/matlab-proxy/blob/main/Advanced-Usage.md).**FullChangelog**:https://github.com/mathworks/matlab-proxy/compare/v0.9.1...v0.10.0INFO:MATLABProxyApp:==============Free software: MIT licenseDocumentation:https://version-tracker.readthedocs.io.History0.1.0 (2023-11-23)First release on PyPI.