Update and resolve requirements.txt based on the Python environment and pip used.
Project description
Python Requirements Updater
Not a pur
, but pru
. Update and resolve requirements.txt
based on the Python environment and pip used.
Installation
pip install pru
Usage
Using CLI:
pru "requirements.txt" upgrade_requirements --cmd "pip install --upgrade"
Using python:
from pru import (
get_installed_requirements_packages_and_version,
get_installed_packages_name_and_version,
replace_requirements_packages_versions,
upgrade_requirements,
)
file_path = 'requirements.txt'
# print(get_installed_requirements_packages_and_version(file_path))
# print(get_installed_packages_name_and_version())
# replace_requirements_packages_versions(file_path)
upgrade_requirements(file_path, command='pip install --upgrade')
Known Issue
In python3.7, pru "sometimes" can't install and update requirements using a single call
of upgrade_requirements
. To fix this, simply run two times.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pru-0.0.1.tar.gz
(5.2 kB
view details)
Built Distribution
pru-0.0.1-py3-none-any.whl
(5.4 kB
view details)
File details
Details for the file pru-0.0.1.tar.gz
.
File metadata
- Download URL: pru-0.0.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0910a0ad2b5863065f3df311d85fc37520f150c28687fdd0bae051218aefc67f |
|
MD5 | ea3fccd4a10c08a9d5042ff3a6307197 |
|
BLAKE2b-256 | 2b2a4928717672c429d6a000f350c856208cd2630ae601107734adcbf2c1f646 |
File details
Details for the file pru-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pru-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a96d4f843f0fc0b3c0d351c42e076f447f71a732ffd48422bec81b0e6f52c96 |
|
MD5 | 1ef062dbca31c519a10ea1690efac19a |
|
BLAKE2b-256 | 4a78eb2ef4dab6e594e3ba989c48a3c0bf520b8eb48ccb27dd0daeb35813f08a |