Install python modules from pypi from a previous date in history
Project description
pip-rewind
pip-rewind
is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.
This tool doesn't install any packages itself - rather, it generates output with modules constrained to specific versions, which can then be fed into pip install
.
Usage
$ pip-rewind --date "09/01/2020" requests > new-requirements.txt
$ pip install -r new-requirements.txt
Or give it a requirements file:
$ pip-rewind --date "07/01/2019" -r requirements.txt > new-requirements.txt
$ pip install -r new-requirements.txt
You can also pipe the output directly to pip if preferred:
$ pip-rewind --date "12/01/2020 -r requirements.txt | pip install -r /dev/stdin
Currently, this package only parses a simple subset of valid requirements lines:
modulename
modulename<=5.0.0
modulename==4.0.0
Any line that describes a pypi dependency named modulename
, possibly with a version identifier after, is valid - this tool simply cares about modulename
since the version will be rewound anyway. Other lines (such as git dependencies) are ignored.
Motivation
Starting to work on old projects that don't have all their dependencies listed and version-constrained can be difficult (especially when some of those dependencies interact with specific versions of OS packages). The simple existence of a line specifying redis
in a requirements.txt file without its version can lead to possible breakage when dealing with month- or year-old software.
LICENSE
MIT
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
Built Distribution
File details
Details for the file pip-rewind-0.1.1.tar.gz
.
File metadata
- Download URL: pip-rewind-0.1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff8cb49cd078d638e1165476d976e836f399690cc193865d70a822483d338287 |
|
MD5 | aca73f5d310b028828ec70835af9b1bc |
|
BLAKE2b-256 | 8d0deaaadbc03b1d66545c85346ca87df111771108efc8dc7ea52ee70abd50a0 |
File details
Details for the file pip_rewind-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pip_rewind-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9516c52405f8ebc8b0a2fe1e08bac8b0ca56028a57db6946886ce4dada64d167 |
|
MD5 | 2703dbbdf5a8e8bb310f1a9d8bd3e0c2 |
|
BLAKE2b-256 | a253c08bd18b2dd24b53b32fc712ecc5ca4d5992c9b7efd70a0da0ffcfd837ef |