2025-05-08 18:30:00
github.com
A Python tool to check your requirements.txt file for package updates, with optional file caching for better performance.
- Check for available updates in your requirements.txt file
- Show update severity (major/minor/patch)
- Display package homepages and changelogs when available
- Optional file caching for faster repeated checks
- Support for comments and inline comments in requirements.txt
- Ignores pre-release versions (alpha, beta, release candidates)
Install from PyPI:
pip install req-update-check
Or install from the repo directly:
pip install git+https://github.com/ontherivt/req-update-check.git
Or install from source:
git clone https://github.com/ontherivt/req-update-check.git
cd req-update-check
pip install -e .
Basic usage:
req-update-check requirements.txt
req-update-check [-h] [--no-cache] [--cache-dir CACHE_DIR] requirements_file
Arguments:
requirements_file
: Path to your requirements.txt file
Options:
--no-cache
: Disable file caching--cache-dir
: Custom cache directory (default:~/.req-update-check-cache
)
File caching enabled
The following packages need to be updated:
requests: 2.28.0 -> 2.31.0 [minor]
Pypi page: https://pypi.python.org/project/requests/
Homepage: https://requests.readthedocs.io
Changelog: https://requests.readthedocs.io/en/latest/community/updates/#release-history
redis: 4.5.0 -> 5.0.1 [major]
Pypi page: https://pypi.python.org/project/redis/
Homepage: https://github.com/redis/redis-py
Changelog: https://github.com/redis/redis-py/blob/master/CHANGES
The tool supports file caching to improve performance when checking multiple times. You can configure the cache storage:
req-update-check --cache-dir ~/.your-cache-dir requirements.txt
The tool supports requirements.txt files with the following formats:
package==1.2.3
package == 1.2.3 # with spaces
package==1.2.3 # with inline comments
# Full line comments
Note: Currently only supports exact version specifiers (==
). Support for other specifiers (like >=
, ~=
) is planned for future releases.
You can also use req-update-check as a Python library:
from req_update_check import Requirements
# Without file cache
req = Requirements('requirements.txt', allow_cache=False)
req.check_packages()
req.report()
# With file cache defaults
req = Requirements('requirements.txt')
req.check_packages()
req.report()
To set up for development:
- Clone the repository
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
source venv/bin/activate
(Unix) orvenv\Scripts\activate
(Windows) - Install development dependencies:
pip install -e ".[dev]"
To run tests:
python -m unittest
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License – see the LICENSE file for details.
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Help Power Techcratic’s Future – Scan To Support
If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.