Skip to main content

UPGRADE ALL THE PIP PACKAGES!

Project description

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.txt file (Also pins up-to-date versions if mentioned).
  • Smart requirements.txt detector.
  • 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 pipupgrade in your CI workflow.
  • Zero Dependencies!

Installation

$ pip install pipupgrade

Usage

Basic Usage

Upgrades all the packages across all detected pip environments.

Upgrades pipupgrade.

Display packages in the format (defaults to table)

Upgrades all the packages within the defined pip environment.

Checks and pretty prints outdated packages (Does not perform upgrades).

WARNING: Upgrades all packages (including the ones that break change).

List all packages.

Prompts confirmation dialog for each package to be upgraded.

Upgrades 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] [-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]
                  [--force] [--no-color] [-V] [-v] [-h]
                  [packages [packages ...]]

pipupgrade (v 1.6.6)

UPGRADE ALL THE PIP PACKAGES!

positional arguments:
  packages              Packages to Upgrade. (default: None)

optional arguments:
  --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)
  -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.


Made with ❤️ using boilpy.

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

pipupgrade-1.6.8.tar.gz (38.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pipupgrade-1.6.8-py3-none-any.whl (37.1 kB view details)

Uploaded Python 3

pipupgrade-1.6.8-py2-none-any.whl (37.2 kB view details)

Uploaded Python 2

File details

Details for the file pipupgrade-1.6.8.tar.gz.

File metadata

  • Download URL: pipupgrade-1.6.8.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9

File hashes

Hashes for pipupgrade-1.6.8.tar.gz
Algorithm Hash digest
SHA256 4beac65f23e73cccb4c5c067c432a82c30db3f436dc406d74323f70a447636f8
MD5 a8d0dc9fd37af496002f6a476223ec6e
BLAKE2b-256 acf3225c960f9f219c2eda0c70c7e9ed1255737148659ca012c51dde94bfdb09

See more details on using hashes here.

File details

Details for the file pipupgrade-1.6.8-py3-none-any.whl.

File metadata

  • Download URL: pipupgrade-1.6.8-py3-none-any.whl
  • Upload date:
  • Size: 37.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9

File hashes

Hashes for pipupgrade-1.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cf16ae16811b015cf887009bea4aff920c2ce6a866f51dd2a6aa78684355375c
MD5 f51997f7fdc836482650fcb80e218be3
BLAKE2b-256 d0a9251b02066991a792fd17bd279b286c66296b3d7a1e190be9341d1d569bfc

See more details on using hashes here.

File details

Details for the file pipupgrade-1.6.8-py2-none-any.whl.

File metadata

  • Download URL: pipupgrade-1.6.8-py2-none-any.whl
  • Upload date:
  • Size: 37.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/2.7.17

File hashes

Hashes for pipupgrade-1.6.8-py2-none-any.whl
Algorithm Hash digest
SHA256 29eb77cfc97898daae3962f31a2bea011390a0f6ff78ff46d3867b3b200938b9
MD5 bc1bd671fcd0b168c67cae13d69cf73e
BLAKE2b-256 ea84ead80654ab61c85cbf757a217db2648ff5a4955b2b6a9f7cfeb0d3d60026

See more details on using hashes here.

Supported by

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