/pipdate

Small pip update helpers.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

pipdate

CircleCI codecov Code style: black PyPI pyversions PyPi Version Anaconda Cloud GitHub stars PyPi downloads

pipdate is a collection of small pip update helpers. The command

pipdate
# or python3.8 -m pipdate

updates all your pip-installed packages. (Only works on Unix.)

There's a Python interface as well that can be used for update notifications. This

import pipdate
msg = pipdate.check("matplotlib", "0.4.5")
print(msg)

will print

╭──────────────────────────────────────────────╮
│                                              │
│       Update available 0.4.5 → 3.1.3         │
│   Run pip install -U matplotlib to update    │
│                                              │
╰──────────────────────────────────────────────╯

If you guard the check with

if pipdate.needs_checking("matplotlib"):
    print(pipdate.check("matplotlib", "0.4.5"), end="")

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

License

This software is published under the GPLv3 license.