check for updates on PyPi
pipdated checks on PyPi if a given module is outdated. Can be used for upgrade notifications.
Using pipdated is really easy. Simply run
import pipdated msg = pipdated.check('matplotlib', '0.4.5') print(msg)
This will print
Upgrade to matplotlib 2.0.0 available! (installed: 0.4.5) matplotlib's API changes in this upgrade. Changes to your code may be necessary. To upgrade matplotlib with pip, type pip install -U matplotlib To upgrade _all_ pip-installed packages, use pipdate/pipdate3 To disable these checks, set SecondsBetweenChecks in /home/jdoe/.config/pipdated/config.ini
If you guard the check with
if pipdated.needs_checking('matplotlib'): print(pipdated.check('matplotlib', '0.4.5'))
then it will be performed at most every k seconds, where k is specified in the config file $HOME/.config/pipdated/config.ini, e.g., once a day
[DEFAULT] secondsbetweenchecks = 86400
This can, for example, be used by module authors to notify users of upgrades of their own modules.
Additionally, pipdated provides the little command-line helper tool pipdate and pipdate3 for upgrading all pip/pip3-installed packages.
pipdated is available from the Python Package Index, so simply type
pip install pipdated
To run the pipdated unit tests, check out this repository and type
To create a new release
bump the __version__ number,
publish to PyPi and GitHub:
$ make publish
pipdated is published under the MIT license.