check for updates on PyPi
Project description
Small pip update helpers.
pipdate checks on PyPi if a given module is outdated. Can be used for upgrade notifications. Addtionally, it provides the little command-line helper tools pipdate/pipdate3 for upgrading all pip/pip3-installed packages.
Using pipdate is really easy. Simply run
import pipdate
msg = pipdate.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/pipdate/config.ini
If you guard the check with
if pipdate.needs_checking('matplotlib'):
print(pipdate.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/pipdate/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.
Installation
pipdate is available from the Python Package Index, so simply type
pip install pipdate
Testing
To run the pipdate unit tests, check out this repository and type
pytest
Distribution
To create a new release
bump the __version__ number,
publish to PyPi and GitHub:
$ make publish
License
pipdate is published under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for pipdate-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08318fa259f4f37ecb7c1d1d53c7c47a1f861b87b844f3a7c04a37b42b7a7c2e |
|
MD5 | 960f550740c8eaee7a74955bd35cbcd0 |
|
BLAKE2b-256 | ca915c0a7a99f5ae7f4400877399ebea084881b20f6684b4fb88f4d976857c33 |