pipupgrade
The missing command for pip
Table of Contents
Features
- Updates system packages and local packages.
- Discovers packages present within multiple Python Environments.
- Updates packages mentioned within a
requirements.txtfile (Also pins up-to-date versions if mentioned). - Smart
requirements.txtdetector. - Pipfile support.
- Detects semantic version to avoid updates that break changes. Also ensures to avoid child dependencies that break changes.
- View Dependency Graph.
- Parallel updates (blazingly fast).
- Python 2.7+ and Python 3.4+ compatible. Also pip 9+, pip 10+, pip 18+ and pip 19.0.1+ compatible.
- Automate your Dependencies by installing
pipupgradein your CI workflow. - Zero Dependencies!
Quick Start
$ pip install pipupgrade
Check out installation for more details.
Usage
Basic Usage
-
Upgrades all the packages across all detected pip environments.
-
Upgrades
pipupgrade. -
pipupgrade --format {table,tree,json,yaml}Display packages in the format (defaults to
table) -
pipupgrade --pip-path PIP_PATHUpgrades all the packages within the defined pip environment.
-
Checks and pretty prints outdated packages (Does not perform upgrades).
-
pipupgrade --upgrade-type {major,minor,patch}Upgrades packages only of the upgrade type (defaults to minor and patch).
-
WARNING: Upgrades all packages (including the ones that break change).
-
List all packages.
-
Prompts confirmation dialog for each package to be upgraded.
-
pipupgrade --requirements REQUIREMENTSUpgrades the requirements file (if required).
-
Upgrades the Pipfile and Pipfile.lock file (if required).
-
Upgrades all the requirements file and/or Pipfile/Pipfile.lock within a project directory.
That's basically it! Run the help for more details...
$ pipupgrade --help
usage: pipupgrade [--pip-path PIP_PATH] [-y] [-c]
[--upgrade-type {major,minor,patch} [{major,minor,patch} ...]]
[-l] [-f {table,tree,json,yaml}] [-a] [--pip] [-s]
[-r REQUIREMENTS] [--pipfile PIPFILE] [-i] [-p PROJECT]
[--git-username GIT_USERNAME] [--git-email GIT_EMAIL]
[--pull-request] [--github-access-token GITHUB_ACCESS_TOKEN]
[--github-reponame GITHUB_REPONAME]
[--github-username GITHUB_USERNAME]
[--target-branch TARGET_BRANCH] [-j JOBS] [-u]
[--no-included-requirements] [--no-cache] [-o OUTPUT]
[--ignore-error] [--force] [--no-color] [-V] [-v] [-h]
[packages [packages ...]]
pipupgrade (v VERSION)
UPGRADE ALL THE PIP PACKAGES!
positional arguments:
packages Packages to Upgrade. (default: None)
optional arguments:
--ignore IGNORE Ignore packages to upgrade. (default: None)
--pip-path PIP_PATH Path to pip executable to be used. (default: None)
-y, --yes Confirm for all dialogs. (default: 0)
-c, --check Perform a dry-run, avoid updating packages. (default:
0)
--upgrade-type {major,minor,patch} [{major,minor,patch} ...]
Upgrade Type (default: ['minor', 'patch'])
-l, --latest Update all packages to latest. (default: 0)
-f {table,tree,json,yaml}, --format {table,tree,json,yaml}
Display packages format. (default: table)
-a, --all List all packages. (default: 0)
--pip Update pip. (default: 0)
-s, --self Update pipupgrade. (default: False)
-r REQUIREMENTS, --requirements REQUIREMENTS
Path(s) to requirements.txt file. (default: None)
--pipfile PIPFILE Path(s) to Pipfile (default: None)
-i, --interactive Interactive Mode. (default: 0)
-p PROJECT, --project PROJECT
Path(s) to Project (default: None)
--git-username GIT_USERNAME
Git Username (default: None)
--git-email GIT_EMAIL
Git Email (default: None)
--pull-request Perform a Pull Request. (default: False)
--github-access-token GITHUB_ACCESS_TOKEN
GitHub Access Token (default: None)
--github-reponame GITHUB_REPONAME
Target GitHub Repository Name (default: None)
--github-username GITHUB_USERNAME
Target GitHub Username (default: None)
--target-branch TARGET_BRANCH
Target Branch (default: master)
-j JOBS, --jobs JOBS Number of Jobs to be used. (default: 4)
-u, --user Install to the Python user install directory for
environment variables and user configuration.
(default: 0)
--no-included-requirements
Avoid updating included requirements. (default: 0)
--no-cache Avoid fetching latest updates from PyPI server.
(default: 0)
-o OUTPUT, --output OUTPUT
Print Output to File. (default: None)
--ignore-error Ignore Error in case of upgrade failure. (default: 0)
--force Force search for files within a project. (default: 0)
--no-color Avoid colored output. (default: 0)
-V, --verbose Display verbose output. (default: False)
-v, --version Show pipupgrade's version number and exit.
-h, --help Show this help message and exit.
Docker
Using pipupgrade's Docker Image to generate a Pull Request can be done as follows:
$ docker run \
-e "PIPUPGRADE_GIT_USERNAME=<YOUR_GIT_USERNAME>" \
-e "PIPUPGRADE_GIT_EMAIL=<YOUR_GIT_EMAIL>" \
-e "PIPUPGRADE_GITHUB_REPONAME=<YOUR_GIT_REPONAME>" \
-e "PIPUPGRADE_GITHUB_USERNAME=<YOUR_GIT_USERNAME>" \
--rm \
-it \
-v $(pwd):/path/to/project \
achillesrasquinha/pipupgrade \
--project /path/to/project \
--pull-request \
--force \
--yes \
--verbose
Similar Packages
pipupgrade attempts to provide an all-in-one solution as compared to the following packages:
Known Issues
License
This repository has been released under the MIT License.
Metadata
Release files for pipupgrade 1.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipupgrade-1.12.0.tar.gz | 36.7 kB | Without provenance | Details for pipupgrade-1.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipupgrade-1.12.0-py3-none-any.whl | Python 3 | none | any | Details for pipupgrade-1.12.0-py3-none-any.whl |
Total release size: 71.2 kB
Release files / pipupgrade-1.12.0.tar.gz
| Download URL | pipupgrade-1.12.0.tar.gz |
|---|---|
| Size | 36.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2320cd2828d872ceed39bbd0e84b920179ef8f004ee2c9bf7e2b766c69f62ee
|
|
BLAKE2b-256 checksum How to use checksums |
f3b813fffa547fce2372fcc25b0e36312b3d6f8becb53fcdaea8c12c38b3465c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / pipupgrade-1.12.0-py3-none-any.whl
| Download URL | pipupgrade-1.12.0-py3-none-any.whl |
|---|---|
| Size | 34.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9dc270d527e6611cf42302daef55db601f4b788002646da77c9dd85068836fc
|
|
BLAKE2b-256 checksum How to use checksums |
8a716659db12bbb8ba15caa0a1936148973d79a0944638eed2769a5a036ed5bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Security for pipupgrade 1.12.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.