vpip.pypi¶
Check update from pypi.org.
- class vpip.pypi.UpdateResult(compatible, latest)¶
Bases:
tupleCreate new instance of UpdateResult(compatible, latest)
- compatible¶
Alias for field number 0
- latest¶
Alias for field number 1
- vpip.pypi.check_update(pkg, curr_version)¶
Check update from pypi and return the result if there is an update available.
- Parameters:
- Return type:
UpdateResult or None
UpdateResulthas two properies,compatibleandlatest, which are two different version string.If
result.compatibleis not None, it must be compatible withcurr_versionand must lager thancurr_version.If
result.latestis not None, it must larger thanresult.compatibleandcurr_version.
- vpip.pypi.get_session()¶
Return a static
requests.Sessionobject used bycheck_update(), so they can share a persistent connection.