Skip to main content

A tool to upgrade dependencies to the latest versions

Project description

logo

pip-check-updates

pytest coding_style PyPI - License PyPI - Python Version PyPI - License PyPI - Wheel

A tool to upgrade dependencies to the latest versions, inspired by npm-check-updates

Install

From PyPi

pip install pip-check-updates

From GitHub

pip install git+https://github.com/zehengl/pip-check-updates.git

Usage

Show any new dependencies for the project in the current directory:

  • Red = major upgrade
  • Cyan = minor upgrade
  • Green = patch upgrade
pcu
Checking dependencies
100%|████████████████████| 6/6 [00:01<00:00,  5.75it/s]

In requirements.txt

tqdm    4.62.0  →  4.62.1
pandas  0.25.3  →  1.3.2
Django  3.1.13  →  3.2.6

Run pcu -u to upgrade requirements.txt

Upgrade a project's requirements file:

pcu -u
Upgrading dependencies
100%|████████████████████| 6/6 [00:01<00:00,  5.84it/s]

In requirements.txt

tqdm    4.62.0  →  4.62.1
pandas  0.25.3  →  1.3.2
Django  3.1.13  →  3.2.6

Run pip install -r ... to install new versions

Specify requirements file if needed, -r option will be recognized as well:

pcu requirements-dev.txt
Checking dependencies
100%|████████████████████| 10/10 [00:01<00:00,  6.05it/s]

In requirements.txt

tqdm    4.62.0  →  4.62.1
pandas  0.25.3  →  1.3.2
Django  3.1.13  →  3.2.6

In requirements-dev.txt

black   21.6b0  →  21.7b0
pylint  2.9.3   →  2.9.6
pytest  5.4.3   →  6.2.4

Run pcu -u to upgrade requirements.txt and requirements-dev.txt

Target version:

pcu requirements-dev.txt -t patch
Checking dependencies
100%|████████████████████| 10/10 [00:02<00:00,  4.73it/s]

In requirements.txt

tqdm  4.62.0  →  4.62.1

In requirements-dev.txt

pylint  2.9.3  →  2.9.6

Run pcu -u to upgrade requirements.txt and requirements-dev.txt

Show the helper text:

pcu -h
usage: pcu [-h] [-u] [-t {latest,newest,greatest,minor,patch}] [path]

pip-check-updates.

positional arguments:
path                  specify path to a requirements file

optional arguments:
-h, --help            show this help message and exit
-u, --upgrade         overwrite package file with upgraded versions instead of just outputting to console.
-t {latest,newest,greatest,minor,patch}, --target {latest,newest,greatest,minor,patch}
                        target version to upgrade to: latest, newest, greatest, minor, patch.
--no_ssl_verify       disable SSL verification.

Test

python setup.py test

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pip-check-updates-0.2.0.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

pip_check_updates-0.2.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page