Skip to main content

A tool to upgrade dependencies to the latest versions

Project description

logo

pip-check-updates

pytest coding_style all-contributors PyPI - License PyPI - Python Version PyPI - Wheel Downloads GitHub Pages

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

Depends on where you install pip-check-updates, if Python's scripts folder is not in path, the pcu entry point would not be available. However you can replace pcu with python -m pip-check-updates.

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

Changes are color coded

  • 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

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

Run pcu requirements.txt -u to upgrade versions in 1 file

Upgrade a project's requirements file:

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

In requirements.txt

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

Run pip install -r requirements.txt 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

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

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 requirements-dev.txt -u to upgrade versions in 2 files

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 requirements-dev.txt -u to upgrade versions in 2 files

Filter by a pattern:

pcu requirements-dev.txt -f "py*"
Checking dependencies
100%|████████████████████| 10/10 [00:01<00:00,  6.01it/s]

In requirements-dev.txt

pylint  2.9.3  →  2.9.6
pytest  5.4.3  →  6.2.4

Run pcu requirements-dev.txt -u to upgrade versions in 1 file

Work with conda-forge (WIP):

pcu environment.yml -u

Work with Pipenv (WIP):

pcu Pipfile

Include unstable versions:

pcu --pre
Checking dependencies
100%|████████████████████| 6/6 [00:01<00:00,  5.75it/s]

In requirements.txt

Django  3.1.13  →  3.2.6.dev
pandas  0.25.3  →  1.3.2.32.dev
tqdm    4.62.0  →  4.62.1.2.dev

Run pcu requirements.txt -u to upgrade versions in 1 file

Show the helper text:

pcu -h
usage: pcu [-h] [-u] [-f FILTER [FILTER ...]] [-t {latest,newest,greatest,major,minor,patch}] [-x] [-i] [--no_ssl_verify] [--no_recursive] [--ignore_warning] [--show_full_path]
        [--no_color] [--ignore_additional_labels] [--init] [--extra EXTRA] [--pre] [--fail_on_update] [--loggable]
        [path]

pip-check-updates: A tool to upgrade dependencies to the latest versions, inspired by npm-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.
-f FILTER [FILTER ...], --filter FILTER [FILTER ...]
                        include only package names matching the given strings.
-t {latest,newest,greatest,major,minor,patch}, --target {latest,newest,greatest,major,minor,patch}
                        target version to upgrade to: latest, newest, greatest, major, minor, patch.
-x, --txt             output new requirements file instead of human-readable message.
-i, --interactive     enable interactive prompts for each dependency.
--no_ssl_verify       disable SSL verification.
--no_recursive        disable recursive checking.
--ignore_warning      ignore warning.
--show_full_path      show full path.
--no_color            disable color.
--ignore_additional_labels
                      ignore additional labels.
--init                initialize pcufile.toml.
--extra EXTRA         extras to consider when parsing TOML files. Not used with Pipfile.
--pre                 include unstable versions when checking for updates.
--fail_on_update      exit with code 1 if updates are available.
--loggable            to be logging friendly.

Credits

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Pedro Américo
Pedro Américo

🐛 💻
Anders Hovmöller
Anders Hovmöller

🐛
Jani Tiainen
Jani Tiainen

🐛
Daniel A.A. Pelsmaeker
Daniel A.A. Pelsmaeker

🐛
Nikolai Røed Kristiansen
Nikolai Røed Kristiansen

🤔 💻
Giovanni Santini
Giovanni Santini

🤔 💻
Pelayo García
Pelayo García

💻 🤔
Radu Suciu
Radu Suciu

🐛 💻
atchisson
atchisson

🤔 💻
purificant
purificant

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

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.27.0.tar.gz (30.5 kB view details)

Uploaded Source

Built Distribution

pip_check_updates-0.27.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file pip_check_updates-0.27.0.tar.gz.

File metadata

  • Download URL: pip_check_updates-0.27.0.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.13

File hashes

Hashes for pip_check_updates-0.27.0.tar.gz
Algorithm Hash digest
SHA256 0c69cc33ce12c22d433c1f2e9deb97123ec8ad9c5214872eb7bba252ccbfbb1a
MD5 63750502861e557aa02b797e0a72e285
BLAKE2b-256 47c03d2f6e68c86ba8e38d392f3f6558d017ba46f42f6b28b432f4b2a82e6e6e

See more details on using hashes here.

File details

Details for the file pip_check_updates-0.27.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pip_check_updates-0.27.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c930d6cd4336a1e985e83a759ce33ead3d530e8d4af1404bac03b954d0bafdaa
MD5 f752f2d3889a7a44b78ee22dd89ec3c9
BLAKE2b-256 66784bff99f036bc4e32b7942443fb88d773eaae642167bd62fef3c58572e094

See more details on using hashes here.

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