Skip to main content

An interactive pip requirements upgrader. It also updates the version in your requirements.txt file.

Project description

pip-upgrader CI

An interactive pip requirements upgrader. Because upgrading requirements, package by package, is a pain in the ass. It also updates the version in your requirements.txt and pyproject.toml files.

Purpose

This cli tool helps you interactively(or not) upgrade packages from requirements files or pyproject.toml, and also update the pinned version in-place.

If no requirements are given, the command attempts to detect requirements file(s) and pyproject.toml in the current directory.

Quick preview:

image

Installation

uv tool install pip-upgrader

or with pip:

pip install pip-upgrader

Requires Python 3.10+

To avoid installing all these dependencies in your project, you can install pip-upgrader as a tool (via uv tool install) or in your system Python, rather than your virtualenv.

Usage

CD into your project. Then:

$ pip-upgrade

This will update the pinned versions in your requirements files. You then install yourself with uv sync, pip install -r requirements.txt, or whatever you use.

Arguments:

requirements_file(s)          The requirement FILE, WILDCARD PATH to multiple files, or pyproject.toml. (positional arguments)
--prerelease                  Include prerelease versions for upgrade, when querying pypi repositories.
-p <package>                  Pre-choose which packages to upgrade. Skips any prompt.
--dry-run                     Simulates the upgrade, but does not execute the actual upgrade.
--skip-greater-equal          Skip packages with >= pins (by default both == and >= are checked).
--use-default-index           Skip searching for custom index-url in pip configuration file(s).
--timeout <seconds>           Set a custom timeout for PyPI requests (default: 15 seconds).

Examples:

pip-upgrade             # auto discovers requirements file(s) and pyproject.toml
pip-upgrade requirements.txt
pip-upgrade pyproject.toml
pip-upgrade requirements/dev.txt requirements/production.txt

# skip prompt and manually choose some/all packages for upgrade
pip-upgrade requirements.txt -p django -p celery
pip-upgrade requirements.txt -p all

# upgrade dependencies in pyproject.toml
pip-upgrade pyproject.toml -p all

# include pre-release versions
pip-upgrade --prerelease

# skip packages pinned with >= (only upgrade == pins)
pip-upgrade --skip-greater-equal

# set a custom timeout for PyPI requests
pip-upgrade --timeout 30

Development

This project uses uv for dependency management:

uv sync --extra test --extra dev   # install all dependencies
uv run pytest                      # run tests
uv run ruff check .                # lint
uv run ruff format --check .       # check formatting

Releasing

Releases are published to PyPI automatically via GitHub Actions when a version tag is pushed:

git tag v2.1.0
git push origin v2.1.0

This triggers the publish.yml workflow which builds and publishes to PyPI using trusted publishers (OIDC).

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_upgrader-2.0.1.tar.gz (5.8 MB view details)

Uploaded Source

Built Distribution

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

pip_upgrader-2.0.1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file pip_upgrader-2.0.1.tar.gz.

File metadata

  • Download URL: pip_upgrader-2.0.1.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pip_upgrader-2.0.1.tar.gz
Algorithm Hash digest
SHA256 73080cbe4e1dfee8478ba362277e184a2200a48448c6c68c2277898a8af25761
MD5 28d683ebd55458d94acf07e85aa472d7
BLAKE2b-256 06073fb362784dc7606753b3699ef745bf2774d9ddd43c52c612a22b81c690a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pip_upgrader-2.0.1.tar.gz:

Publisher: publish.yml on simion/pip-upgrader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pip_upgrader-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pip_upgrader-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pip_upgrader-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e91e768ceb339df2740d4230543e3969e86934b39e7b715474e9b571dd065d83
MD5 93cfede478f61ca0d8bc7ced89c8e80f
BLAKE2b-256 eb27b2db1d5ce4be0d09c3abb179f444761e3963a74bbadbcae5de5020af7cad

See more details on using hashes here.

Provenance

The following attestation bundles were made for pip_upgrader-2.0.1-py3-none-any.whl:

Publisher: publish.yml on simion/pip-upgrader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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