Install packages with pip as if you were in the past!

Overview

A PyPI time machine

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.)

Comments
  • Make date to be part of the index url

    Make date to be part of the index url

    I am here in a follow up to https://github.com/ReproNim/repropip/issues/1 and I think pypi-timemachine is exactly what I need besides one "wishlist" aspect: be able to specify date not while starting up the pypi-timemachine but rather in the index-url, e.g.

     pip install --index-url http://127.0.0.1:5000/2014-02-03T12:33:02/ astropy
    

    thus making it possible to reuse the same server for various dates, similarly to how https://snapshot.debian.org/ works. Do you think it is possible to implement or would be prohibitively expensive. (I haven't checked yet how pypi-timemachine functions, decided to just ask first... socializing you know ;-) )

    opened by yarikoptic 1
  • Add a command to start other processes such as `pip` with index server configured

    Add a command to start other processes such as `pip` with index server configured

    First of all, thanks for the awesome tool!

    I'm using this in tox, testing my addon against several versions of an app that is available in pypi but doesn't pin its dependencies. Therefore I opted for using pypi-timemachine and not tox-timemachine. The tool works, but I have to jump through a few hoops to get its port and then to kill it when done.

    It would be nice if the tool allowed launching stuff directly, like for instance xvfb-run vs Xvfb. I imagine something like this:

    pypi_timemachine --cutoff-date=2022-05-05 run pip install foo bar
    

    This can be achieved simply by setting PIP_INDEX_SERVER and waiting for the child process to finish.

    opened by oakkitten 0
  • Can not find version that exists at specific date

    Can not find version that exists at specific date

    I want to install the scikit-learn 0.21.2 but don't want to install its latest dependences I notice that scikit-learn 0.21.2 release on May 24, 2019

    With the following command I start the timemachine pypi-timemachine 2019-05-26

    However, when I type in the command pip install --no-cache-dir --index-url http://127.0.0.1:46403/ scikit-learn==0.21.2

    It failed and the error message is above image Am I made some mistakes or it's a bug?

    opened by Reset816 2
  • Tests

    Tests

    In order to validate my rpm package, some sort of tests are needed. https://build.opensuse.org/package/show/home:jayvdb:py-new/python-pypi-timemachine

    opened by jayvdb 0
  • Mention pip's

    Mention pip's "--ignore-installed" option?

    pip's "--ignore-installed" option should let you forcibly downgrade an existing environment (although making a new env is still going to be more reliable)

    opened by ncoghlan 1
Owner
Thomas Robitaille
Thomas Robitaille
Extended functionality for Namebase past their web UI

Namebase Extended Extended functionality for Namebase past their web UI.

RunDavidMC 12 Sep 2, 2022
These are After Effects and Python files that were made in the process of creating the video for the contest.

spirograph These are After Effects and Python files that were made in the process of creating the video for the contest. In the python file you can qu

null 91 Dec 7, 2022
PIP VA TASHQI KUTUBXONALAR

39-dars PIP VA TASHQI KUTUBXONALAR KIRISH Avvalgi darsimizda Python bilan birga o'rnatluvchi, standart kutubxona va undagi ba'zi foydali modullar bila

Sayfiddin 3 Nov 25, 2021
An assistant to guess your pip dependencies from your code, without using a requirements file.

Pip Sala Bim is an assistant to guess your pip dependencies from your code, without using a requirements file. Pip Sala Bim will tell you which packag

Collage Labs 15 Nov 19, 2022
PIP Manager written in python Tkinter

PIP Manager About PIP Manager is designed to make Python Package handling easier by just a click of a button!! Available Features Installing packages

Will Payne 9 Dec 9, 2022
A simple and easy to use Python's PIP configuration manager, similar to the Arch Linux's Java manager.

PIPCONF - The PIP configuration manager If you need to manage multiple configurations containing indexes and trusted hosts for PIP, this project was m

João Paulo Carvalho 11 Nov 30, 2022
InverterApi - This project has been designed to take monitoring data from Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta

InverterApi - This project has been designed to take monitoring data from Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta

Josep Escobar 2 Sep 3, 2022
Automatically give thanks to Pypi packages you use in your project!

Automatically give thanks to Pypi packages you use in your project!

Ward 25 Dec 20, 2021
Install Firefox from Mozilla.org easily, complete with .desktop file creation.

firefox-installer Install Firefox from Mozilla.org easily, complete with .desktop file creation. Dependencies Python 3 Python LXML Debian/Ubuntu: sudo

rany 7 Nov 4, 2022
Install JetBrains Toolbox

ansible-role-jetbrains-toolbox Install JetBrains Toolbox Example Playbook This example is taken from molecule/default/converge.yml and is tested on ea

Antoine Mace 2 Feb 4, 2022
creates a batch file that uses adb to auto-install apks into the Windows Subsystem for Android and registers it as the default application to open apks.

wsa-apktool creates a batch file that uses adb to auto-install apks into the Windows Subsystem for Android and registers it as the default application

Aditya Vikram 3 Apr 5, 2022
Fonts used to be an install-and-forget thing, but many of are now updated regularly.

Your font manager. Fonts used to be an install-and-forget thing, but many of are now updated regularly. fontman helps you keep track of the fonts you

Nico Schlömer 20 Feb 7, 2022
Xbps-install wrapper written in Python that doesn't care about case sensitiveness and package versions

xbi Xbps-install wrapper written in Python that doesn't care about case sensitiveness and package versions. Description This Python script can be easi

Emanuele Sabato 5 Apr 11, 2022
Bazel rules to install Python dependencies with Poetry

rules_python_poetry Bazel rules to install Python dependencies from a Poetry project. Works with native Python rules for Bazel. Getting started Add th

Martin Liu 7 Dec 15, 2021
Packages of Example Data for The Effect

causaldata This repository will contain R, Stata, and Python packages, all called causaldata, which contain data sets that can be used to implement th

null 103 Dec 24, 2022
This is a method to build your own qgis configuration packages using osgeo4W.

This is a method to build your own qgis configuration packages using osgeo4W. Then you can automate deployment in your organization with a controled and trusted environnement.

Régis Haubourg 26 Dec 5, 2022
An AI-powered device to stop people from stealing my packages.

Package Theft Prevention Device An AI-powered device to stop people from stealing my packages. Installation To install on a raspberry pi, clone the re

rydercalmdown 157 Nov 24, 2022
PyScaffold is a project generator for bootstrapping high quality Python packages

PyScaffold is a project generator for bootstrapping high quality Python packages, ready to be shared on PyPI and installable via pip. It is easy to use and encourages the adoption of the best tools and practices of the Python ecosystem, helping you and your team to stay sane, happy and productive. The best part? It is stable and has been used by thousands of developers for over half a decade!

PyScaffold 1.7k Jan 3, 2023
A Python Perforce package that doesn't bring in any other packages to work.

P4CMD ?? A Python Perforce package that doesn't bring in any other packages to work. Relies on p4cli installed on the system. p4cmd The p4cmd module h

Niels Vaes 13 Dec 19, 2022