Manage Requirements Files
manage-requirements-files is a Python CLI tool designed to help developers efficiently manage their project dependencies. It automates the updating of requirements.txt and requirements-dev.txt by appending new dependencies from the activated Python environment.
Features
- Detects newly installed packages not listed in
requirements.txtorrequirements-dev.txt. - Appends new dependencies to the appropriate requirements file without duplicating entries.
- Creates
requirements.txtorrequirements-dev.txtif they don't already exist.
Installation
Install manage-requirements-files globally using pip:
pip install manage-requirements-files
Usage
Ensure you activate your project's virtual environment before using the commands:
source /path/to/your/venv/bin/activate # for Unix-like systems
\path\to\your\venv\Scripts\activate # for Windows
Updating Production Dependencies
After installing your production dependencies with pip install, update requirements.txt by running:
manage-dependencies prod
This populates requirements.txt with all recently installed production dependencies.
Updating Development Dependencies
Following the installation of development dependencies, update requirements-dev.txt by running:
manage-dependencies dev
Note
Install dependencies incrementally and categorize them as production or development before running the respective command. Attempting to separate a mixed set of installed dependencies may not yield the desired results.
How It Works
When manage-dependencies is executed, it:
- Runs
pip freezeto list the currently installed packages. - Read the existing entries from both
requirements.txtandrequirements-dev.txt. - Identify any new dependencies that are not listed in either file.
- Appends these new dependencies to the appropriate file based on the selected mode.
Global Installation and Environment-Specific Usage
Install manage-requirements-files once on your system to use across all Python projects. The tool will adjust requirements.txt or requirements-dev.txt in the current active virtual environment, allowing you to manage dependencies without needing to install the tool in each environment.
Contributing
Contributions are welcome! If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature.
- Add your changes.
- Submit a pull request.
Please make sure to update tests as appropriate.
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Guilherme Gouw - guilherme.gouw@gmail.com
Release files for manage-requirements-files 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| manage_requirements_files-0.1.3.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| manage_requirements_files-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / manage_requirements_files-0.1.3.tar.gz
| Download URL | manage_requirements_files-0.1.3.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39b441c7c9b366707681635d273a3b5f52fbd6777c94b8a002e4843a6377d990
|
|
BLAKE2b-256 checksum How to use checksums |
8d25e20e89b40276acb7d1cac0ed045d5f0aedcd7aaeeccbe20a18df8a12fa78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / manage_requirements_files-0.1.3-py3-none-any.whl
| Download URL | manage_requirements_files-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90fe36848d005a211a11d213db96d18b48e9882b501ef72cbce0f165146ad70d
|
|
BLAKE2b-256 checksum How to use checksums |
51dbce476fe74acd0c4460a34a2a5a7fe516a96f0275e80bca80da8f7a2e7164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|