Skip to main content

A small CLI tool to check and upgrade outdated pip packages.

Project description

py-pkg-updater

A clean, interactive CLI for checking and upgrading outdated Python packages in your current environment.

PyPI version Python versions License: MIT Publish to PyPI


Overview

py-pkg-updater helps you inspect outdated pip packages, compare installed versions with the latest available versions, and upgrade selected packages from an interactive terminal interface.

It is designed for developers who want a faster, cleaner workflow than repeatedly running pip list --outdated and manually upgrading packages one by one.


Screenshots

Outdated packages table

Outdated packages table

Upgrade progress

Upgrade progress


Features

  • Detect outdated packages using pip list --outdated
  • Display outdated packages in a clean terminal table
  • Upgrade all packages or selected packages only
  • Select packages by number or by package name
  • Rich-powered terminal UI when rich is available
  • Plain terminal fallback when rich is not installed
  • Works inside any Python environment where pip is available

Installation

Install from PyPI:

pip install py-pkg-updater

Upgrade to the latest version:

pip install --upgrade py-pkg-updater

Usage

Run the command inside the Python environment you want to update:

update-packages

You will see a list of outdated packages and an interactive selection prompt.

Selection options

A        upgrade all packages
N        skip upgrading
1,3,5    upgrade selected packages by number
pip,rich upgrade selected packages by name

Recommended Workflow

Use py-pkg-updater inside an activated virtual environment.

Windows PowerShell

python -m venv venv
.\venv\Scripts\Activate.ps1
pip install py-pkg-updater
update-packages

Windows CMD

python -m venv venv
venv\Scripts\activate
pip install py-pkg-updater
update-packages

macOS / Linux

python3 -m venv venv
source venv/bin/activate
pip install py-pkg-updater
update-packages

Why Use a Virtual Environment?

py-pkg-updater upgrades packages in the Python environment where it is executed.

For safer dependency management, use it inside a project-specific virtual environment instead of your global Python installation. This reduces the risk of breaking system-level tools or unrelated projects.


Requirements

  • Python 3.9 or newer
  • pip
  • rich

Development

Clone the repository:

git clone https://github.com/AlonePyWarrior/packages_updator.git
cd packages_updator/update-python-packages

Create and activate a virtual environment:

python -m venv venv

Windows PowerShell:

.\venv\Scripts\Activate.ps1

Windows CMD:

venv\Scripts\activate

macOS / Linux:

source venv/bin/activate

Install the package in editable mode:

pip install -e .

Run locally:

update-packages

Build Locally

Install build tools:

pip install --upgrade build twine

Build the package:

python -m build

Check the distribution metadata:

python -m twine check dist/*

This creates distribution files in the dist/ directory.


Release Process

This project can be published manually with Twine or automatically through GitHub Actions and PyPI Trusted Publishing.

Manual release

python -m build
python -m twine check dist/*
python -m twine upload dist/*

Automated release with GitHub Actions

  1. Update the package version in pyproject.toml and src/update_python_packages/__init__.py.
  2. Commit the version bump.
  3. Push a version tag such as v0.1.6.
  4. GitHub Actions builds and publishes the package to PyPI.

Example:

git add .
git commit -m "Release 0.1.6"
git push origin main
git tag v0.1.6
git push origin v0.1.6

Project Structure

packages_updator/
├── .github/
│   └── workflows/
│       └── publish-to-pypi.yml
├── update-python-packages/
│   ├── src/
│   │   └── update_python_packages/
│   │       ├── __init__.py
│   │       └── cli.py
│   ├── pyproject.toml
│   ├── README.md
│   └── LICENSE
└── release.py

Safety Notes

Package upgrades can introduce breaking changes, especially in active projects.

Recommended workflow:

  1. Activate your project virtual environment.
  2. Run update-packages.
  3. Upgrade selected packages.
  4. Run your tests.
  5. Commit dependency changes only if everything works.

Avoid running bulk upgrades in a production environment without testing.


Common Commands

Task Command
Install package pip install py-pkg-updater
Upgrade package pip install --upgrade py-pkg-updater
Run CLI update-packages
Build locally python -m build
Check build python -m twine check dist/*
Editable install pip install -e .

License

This project is licensed under the MIT License.


Author

Created by Ali Esmaeilzadeh.

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

py_pkg_updater-0.1.7.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

py_pkg_updater-0.1.7-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file py_pkg_updater-0.1.7.tar.gz.

File metadata

  • Download URL: py_pkg_updater-0.1.7.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_pkg_updater-0.1.7.tar.gz
Algorithm Hash digest
SHA256 09cde1323b2c02de051d109912294cadfa62c5b4feb67cbc243a1b12dc892757
MD5 8aa14bb5a197c25ebff9c158b8e7e6cf
BLAKE2b-256 caafa6cf50cd484513a3851b822365beeb52aba530b9153525fff1da27ce0186

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_pkg_updater-0.1.7.tar.gz:

Publisher: publish-to-pypi.yml on AlonePyWarrior/packages_updator

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

File details

Details for the file py_pkg_updater-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: py_pkg_updater-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_pkg_updater-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 daf250efc504c3afdc0310cd547fcd4603e793ff418f69ff73755794a3737955
MD5 43c4059a33694d10e5c327ce0720840a
BLAKE2b-256 8c0f65232b40147a7f015eefbab6173ee47a2fe9ec387dac1f080f29400e9865

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_pkg_updater-0.1.7-py3-none-any.whl:

Publisher: publish-to-pypi.yml on AlonePyWarrior/packages_updator

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