Run a PyPI server from the past
Project description
Do you wish you could just install packages with pip as if you were at some fixed date in the past? If so, the PyPI time machine is for you!
Disclaimer: this is alpha-quality software - for now it is a quick hack, but I’d love to make this more robust/usable with your help!
Installing
To install:
pip install pypi-timemachine
Using
Once installed, you can run a PyPI server with:
pypi-timemachine 2014-02-03
or if you need to specify a precise time (in UTC):
pypi-timemachine 2014-02-03T12:33:02
This will start up a Flask app, and will print out a line such as:
Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
You can then call pip with:
pip install --index-url http://127.0.0.1:5000/ astropy
and this will then install the requested packages and all dependencies, ignoring any releases after the cutoff date specified above.
Caveats/warnings
If a package is already installed, pip will not try installing it again. This means that if e.g. you try and run pip as described above, but the package you are trying to install (or any of its dependencies) is already installed, no matter how recent the version, it will not be installed again. Therefore, I recommend using pip with the custom index URL inside a clean environment (but you can run the pypi-timemachine command inside your regular environment.)
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 pypi-timemachine-0.2.tar.gz
.
File metadata
- Download URL: pypi-timemachine-0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21d4e29e9d2829858dcf68afffadb2e957e3d3dbe0c162dd9d75f9e7516881d1 |
|
MD5 | f75d7c14ea104a3d3e16958a22a5a092 |
|
BLAKE2b-256 | 437badd59043be123d2d5a6bcad900882f5a1095f8b69c2affba20c1d07944b1 |
File details
Details for the file pypi_timemachine-0.2-py3-none-any.whl
.
File metadata
- Download URL: pypi_timemachine-0.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92e771bc1945ff45e5c338b5e6110d84693496b008d9f059ab5eec23ec47299 |
|
MD5 | b0423a6b99bc9d48342661363c094353 |
|
BLAKE2b-256 | 5f5b1a7317d085fe12a4803627416b8d8c93935d6dee2dc28f49bd20965f2260 |