Chronos for pip: Automatically update your requirements.txt files with the latest package versions
Project description
pip-chronos
pip-chronos is a command-line tool that automatically updates your requirements.txt files with the latest package versions from PyPI. Like the Greek god Chronos who governs time, this tool helps keep your dependencies up to date.
Features
- Simple to Use: Run with a single command to update all requirements
- Parallel Processing: Checks multiple packages concurrently for better performance
- Flexible: Update a specific file or search directories for requirements files
- Version Constraint Awareness: Handles all version specifiers (==, >=, <=, etc.)
- Dependency Validation: Validates that updated dependencies can be installed together
- Dry Run Mode: Preview changes without modifying files
- Smart Detection: Preserves comments and formatting in requirements files
Installation
Install from PyPI:
pip install pip-chronos
Usage
Update all requirements files in the current directory and subdirectories:
pip-chronos
Update a specific requirements file:
pip-chronos path/to/requirements.txt
Run in dry-run mode (show changes without modifying files):
pip-chronos --dry-run
Exclude packages with version ranges (>=, <=, etc.):
pip-chronos --no-update-ranges
Use a custom pattern to find requirements files:
pip-chronos --pattern="**/requirements*.txt"
Skip dependency validation:
pip-chronos --no-validate
Options
positional arguments:
path Directory or specific requirements file path (default: current directory)
options:
-h, --help show this help message and exit
--pattern PATTERN Glob pattern for finding requirements files (default: **/requirements.txt)
--sequential Run updates sequentially (no parallel processing)
--no-update-ranges Do not update packages with range operators (>=, <=, etc.)
--no-validate Skip validation of dependencies
--dry-run Show what would be updated without making changes
--max-workers MAX_WORKERS
Maximum number of worker threads (default: 10)
Examples
Update all requirements files in the project:
pip-chronos
Update only a specific service subdirectory:
pip-chronos services/api-service/
Preview updates without making changes:
pip-chronos --dry-run
Exclude packages with version ranges (>=, <=, etc.):
pip-chronos --no-update-ranges
Use a custom pattern to find requirements files:
pip-chronos --pattern="**/requirements*.txt"
Skip dependency validation:
pip-chronos --no-validate
How It Works
- Finds all
requirements.txtfiles in the specified directory (or uses a single file if provided) - For each package with a version specification, it checks for the latest available version using
pip index versions - If a newer version is available, it updates the line in the requirements file
- By default, all packages with version specifiers are updated
- Validates that the updated dependencies can be installed together (unless --no-validate is specified)
- Preserves all comments and formatting in the requirements files
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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 pip_chronos-0.1.4.tar.gz.
File metadata
- Download URL: pip_chronos-0.1.4.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8c7df4c031972e044f7720b52548e66c274c88d379ffc0f1132a0169d52dfc0
|
|
| MD5 |
d9cddca3f2bfb8ec8844d1f8daec9424
|
|
| BLAKE2b-256 |
b375793ae60b3d537bf29078e2d5490a301cc8b584ea5988a6ae3803337de2d9
|
File details
Details for the file pip_chronos-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pip_chronos-0.1.4-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13b38f02de9d4c32033edc98ae54f8f5a68b7a9d6d4646c22a51d266ec5d1a79
|
|
| MD5 |
7549b0685c14dddd799847de4c9a21cf
|
|
| BLAKE2b-256 |
d59d39398d659f640e13e70f199e36d41a3e7969213a4f5f63f9527d112a4c82
|