vpip.pypi¶
Check update from pypi.org.
- class vpip.pypi.UpdateResult(compatible, latest)¶
Bases:
tuple
Create 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
UpdateResult
has two properies,compatible
andlatest
, which are two different version string.If
result.compatible
is not None, it must be compatible withcurr_version
and must lager thancurr_version
.If
result.latest
is not None, it must larger thanresult.compatible
andcurr_version
.
- vpip.pypi.get_session()¶
Return a static
requests.Session
object used bycheck_update()
, so they can share a persistent connection.