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 hashes)
Built Distribution
pru-0.0.1-py3-none-any.whl
(5.4 kB
view hashes)