A small CLI tool to check and upgrade outdated pip packages.
Project description
py-pkg-updater
A simple command-line tool for checking and upgrading outdated Python packages in your current environment.
py-pkg-updater helps you quickly inspect outdated pip packages, review the current and latest versions, and upgrade selected packages directly from the terminal.
Features
- Detect outdated packages using
pip list --outdated - Display outdated packages in a clean terminal table
- Upgrade all packages or selected packages only
- Supports both package names and numeric selection
- Uses Rich for a better terminal interface when available
- Falls back to plain terminal output if Rich is not installed
Installation
Install from PyPI:
pip install py-pkg-updater
Usage
Run the command inside the Python environment you want to update:
update-packages
The tool will show outdated packages and ask what you want to upgrade.
Example options:
A upgrade all packages
N skip upgrading
1,3,5 upgrade selected packages by number
rich,pip upgrade selected packages by name
Example
update-packages
Example output:
Outdated packages
# Package Current Latest
1 pip 24.0 25.1.1
2 rich 13.7.0 13.9.4
Choose packages to upgrade:
A upgrade all
N skip upgrading
1,3,5 comma-separated indices or package names
Recommended Use
Use this tool inside an activated virtual environment:
Windows PowerShell
python -m venv venv
.\venv\Scripts\Activate.ps1
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?
This tool upgrades packages in the Python environment where it is executed.
For safer package management, run it inside a project-specific virtual environment instead of your global Python installation.
Requirements
- Python 3.9 or newer
- pip
- rich
Development
Clone the repository:
git clone https://github.com/YOUR_USERNAME/py-pkg-updater.git
cd py-pkg-updater
Create and activate a virtual environment:
python -m venv venv
Windows:
.\venv\Scripts\Activate.ps1
macOS / Linux:
source venv/bin/activate
Install in editable mode:
pip install -e .
Run locally:
update-packages
Build
Install build tools:
pip install --upgrade build twine
Build the package:
python -m build
This creates distribution files inside the dist/ directory.
Publish
Upload to PyPI:
python -m twine upload dist/*
Project Structure
py-pkg-updater/
├── src/
│ └── update_python_packages/
│ ├── __init__.py
│ └── cli.py
├── pyproject.toml
├── README.md
├── LICENSE
└── dist/
Security Note
Be careful when upgrading many packages at once. Package updates can introduce breaking changes, especially in active projects.
Recommended workflow:
- Activate your virtual environment.
- Run
update-packages. - Upgrade selected packages.
- Test your project.
- Commit dependency changes if everything works.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_pkg_updater-0.1.6.tar.gz.
File metadata
- Download URL: py_pkg_updater-0.1.6.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e15163bbbb6b33ff6d4c06806c4678fb07c3da300591690f9a78db559d86728
|
|
| MD5 |
9d4ff5c240c113c210b53e2dd85efac2
|
|
| BLAKE2b-256 |
2b1de914b346e0f79540f96f6d4e196bda46f3162700c904870b61afd8033457
|
Provenance
The following attestation bundles were made for py_pkg_updater-0.1.6.tar.gz:
Publisher:
publish-to-pypi.yml on AlonePyWarrior/packages_updator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_pkg_updater-0.1.6.tar.gz -
Subject digest:
6e15163bbbb6b33ff6d4c06806c4678fb07c3da300591690f9a78db559d86728 - Sigstore transparency entry: 2103070955
- Sigstore integration time:
-
Permalink:
AlonePyWarrior/packages_updator@0ede96c55e9b1dba4a857427913054798e30402d -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/AlonePyWarrior
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@0ede96c55e9b1dba4a857427913054798e30402d -
Trigger Event:
push
-
Statement type:
File details
Details for the file py_pkg_updater-0.1.6-py3-none-any.whl.
File metadata
- Download URL: py_pkg_updater-0.1.6-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6830b479dfc7b534ebb775f2c4678841989aac9a64eeeb7a16e948c4167d395a
|
|
| MD5 |
33a2c0d0c60842cd02a39e90068fd23a
|
|
| BLAKE2b-256 |
c66618d04f7011b7145accd023b093b01e78f834449f2784a964cd78e00ed370
|
Provenance
The following attestation bundles were made for py_pkg_updater-0.1.6-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on AlonePyWarrior/packages_updator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_pkg_updater-0.1.6-py3-none-any.whl -
Subject digest:
6830b479dfc7b534ebb775f2c4678841989aac9a64eeeb7a16e948c4167d395a - Sigstore transparency entry: 2103071440
- Sigstore integration time:
-
Permalink:
AlonePyWarrior/packages_updator@0ede96c55e9b1dba4a857427913054798e30402d -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/AlonePyWarrior
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@0ede96c55e9b1dba4a857427913054798e30402d -
Trigger Event:
push
-
Statement type: