Pip Freezer
Overview
For the organized, but lazy developer, meaning that you'll update a package, but you don't want to be bothered with updating the requirements file. Pip Freezer pins packages no matter which requirements file they live in and maintains your comments and line breaks.
NOTE: Plays nice with Django Cookiecutter.
Background
We all have our preferences with how we manage package dependencies. There is the awesome Poetry, but there are still those of us who like to manually manage requirements with comments in various files such as requirements.txt, requirements_dev.txt. requirements_test.txt, or even requirements/base.txt, requirements/local.txt and requirements/production.txt or other similar variations.
Simply running pip freeze > requirements.txt is not of much use if you like to be organized and only pin what you've manually defined as a "top-level" dependency (and not its sub-dependencies).
Running pipfreezer will only pin packages defined in your requirements files.
NOTE:
pipfreezerdoes not do any upating of packages itself, you can usepip install -U package-nameor something like pip-review. You would manually update packages and then runpipfreezerto auto-update those in your requirements files.
Installation
To install Pip Freezer, simply use pip:
$ python3 -m pip install pip-freezer
Usage
In the root of your project, run:
# Freeze only packages defined in your requirements files.
pipfreezer freeze
# Update only the packages defined in your requirements files.
pipfreezer upgrade
NOTE: For help run
pipfreezer --helpor for a specific command runpipfreezer {command} --help.
NOTE:
pipfreezerwill not add or pin packages that you have not already defined in one of your requirements files. This is intentional.
Development
make env
make pip_install
make pip_install_editable
Testing
make pytest
make coverage
make open_coverage
Issues
If you experience any issues, please create an issue on Github.
History
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
0.3.8 (2024-06-19)
- Updated
find_requirements_filesglob patterns
0.3.7 (2024-04-22)
- Moved from
argparsetoclick. - Removed
colorama
0.3.6 (2024-04-11)
- Update to using
ruffand added tests.
0.3.5 (2023-06-23)
- Fixed typo in pip installation command
0.3.4 (2021-09-14)
- Changed from
pip freezetopip list --format jsonfor more reliable parsing
0.3.3 (2021-09-13)
- Fixed encountering
-rinpipfreezer-upgrade
0.3.2 (2021-09-13)
- Add experimental
pipfreezer-upgradecommand which only upgrades packages listed in requirements files.
0.3.1 (2021-09-10)
- Too hasty. Remove some print statements.
0.3.0 (2021-09-10)
- Major re-release. This package behaves NOTHING like the previous.
0.2.0 (2018-02-25)
- Code cleanup and Python 2/3 support.
0.1.0 (2017-12-04)
- First release on PyPI.
Metadata
Release files for pip-freezer 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pip_freezer-0.3.8.tar.gz | 11.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pip_freezer-0.3.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 kB
Release files / pip_freezer-0.3.8.tar.gz
| Download URL | pip_freezer-0.3.8.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57f1e211ee9e349bf5639855e67cead762d7bb0d67dd05c9fe44c8e44552b7ec
|
|
BLAKE2b-256 checksum How to use checksums |
947fd7c2dd89eeca0b455281fa3cc16ee18cb56593876777e196aed5f8a0818f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.11
|
Release files / pip_freezer-0.3.8-py3-none-any.whl
| Download URL | pip_freezer-0.3.8-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1ee9ac782e6628017f6a8004818802164f7b368fcad1c35f992cf0fe22cac5a
|
|
BLAKE2b-256 checksum How to use checksums |
7c7fbb9006b08d3574cb49f5b697bd1e182810105eca1846ecdce2c545ee4e0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.11
|