Skip to main content

A smart CLI tool to clean and update requirements.txt by fetching the latest versions from PyPI.

Project description

update-reqs 🚀

A smart CLI tool to clean and update your requirements.txt by fetching the latest package versions from PyPI.

✨ Features

Remove version numbers from requirements.txt (clean mode).
🚧 Fetch and update to the latest package versions from PyPI.
🔜 Preserve comments and structure in the requirements file.
🔜 Fast batch requests to PyPI for improved performance (In Progress).
🔜 Dry-run mode to preview changes before applying (Coming Soon).
🔜 Backup option before modifying requirements.txt (Coming Soon).

📦 Installation

pip install update-reqs

🚀 Usage

Basic Commands

Command Description
update-reqs clean --file requirements.txt Removes all version numbers from the file.
update-reqs update --file requirements.txt Updates all packages to the latest versions.
update-reqs update --file path/to/requirements.txt Updates a specific requirements file.
update-reqs --help Displays help and usage information.

📌 Feature Checklist

Feature Status
Remove version numbers ✅ Done
Fetch latest versions 🚧 In Progress
Preserve comments and formatting 🔜 Coming Soon
Parallelized requests for speed 🔜 Coming Soon
Dry-run mode (preview updates) 🔜 Coming Soon
Backup before modifying file 🔜 Coming Soon

🔥 How It Works

  1. Reads requirements.txt and extracts package names.
  2. Fetches the latest version of each package from PyPI.
  3. Updates the file while keeping comments and spacing intact.
  4. Writes back the updated requirements.txt.

🤝 Contributing

Want to help improve update-reqs? Follow these steps:

  1. Fork the repo.
  2. Clone your fork:
    git clone https://github.com/your-username/update-reqs.git
    cd update-reqs
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Create a new branch:
    git checkout -b feature-name
    
  5. Submit a Pull Request! 🚀

📜 License

This project is licensed under the MIT License.

🔹 Happy Coding!

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

update_reqs-1.2.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

update_reqs-1.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file update_reqs-1.2.0.tar.gz.

File metadata

  • Download URL: update_reqs-1.2.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for update_reqs-1.2.0.tar.gz
Algorithm Hash digest
SHA256 87bc87f12b26e755ad8d8430102688ddba1cff0f433388d01d454d9e50aade60
MD5 56bf8554eeb0cbeaf09b501daee99589
BLAKE2b-256 5928c081e89dbf180e31522ccc1ad6ba1d442bb33c9c98cb5af4ce8e664e706c

See more details on using hashes here.

File details

Details for the file update_reqs-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: update_reqs-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for update_reqs-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8c24b4499c9dc33959dcf00521b8d5656ad3b5f019a97104fedeb20b950b7ac
MD5 dd7d631183602e4eb24d5f7830644b00
BLAKE2b-256 979430cf68c091a43492e93f4314700876f3f83ec5b21043fd399969c36f293d

See more details on using hashes here.

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