{"id":15358372,"url":"https://github.com/astrofrog/pypi-timemachine","last_synced_at":"2025-04-11T11:45:29.295Z","repository":{"id":47965974,"uuid":"196262576","full_name":"astrofrog/pypi-timemachine","owner":"astrofrog","description":"Install packages with pip as if you were in the past!","archived":false,"fork":false,"pushed_at":"2025-04-09T19:54:36.000Z","size":9,"stargazers_count":119,"open_issues_count":9,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T20:42:57.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrofrog.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-10T19:17:51.000Z","updated_at":"2025-04-09T19:54:40.000Z","dependencies_parsed_at":"2022-08-12T15:21:11.966Z","dependency_job_id":null,"html_url":"https://github.com/astrofrog/pypi-timemachine","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fpypi-timemachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fpypi-timemachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fpypi-timemachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fpypi-timemachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrofrog","download_url":"https://codeload.github.com/astrofrog/pypi-timemachine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111938,"owners_count":21049576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:40:56.642Z","updated_at":"2025-04-11T11:45:29.282Z","avatar_url":"https://github.com/astrofrog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A PyPI time machine\n-------------------\n\nDo you wish you could just install packages with pip as if you were at\nsome fixed date in the past? If so, the PyPI time machine is for you!\n\n**Disclaimer:** this is alpha-quality software - for now it is a quick hack,\nbut I'd love to make this more robust/usable with your help!\n\nInstalling\n~~~~~~~~~~\n\nTo install::\n\n   pip install pypi-timemachine\n\nUsing\n~~~~~\n\nOnce installed, you can run a PyPI server with::\n\n   pypi-timemachine 2021-02-03\n\nor if you need to specify a precise time (in UTC)::\n\n   pypi-timemachine 2021-02-03T12:33:02\n\nThis will start up a webapp running uvicorn, and will print out a line such as::\n\n    pypi-timemachine server listening at http://localhost:5000  (Press CTRL+C to quit)\n      Hint: Setting the environment variable PIP_INDEX_URL=\"http://localhost:5000\" is one way to configure pip to use this timemachine\n\nYou can then configure pip to use the time machine, for example::\n\n   pip install --index-url http://127.0.0.1:5000/ astropy\n\nand this will then install the requested packages and all dependencies,\nignoring any releases after the cutoff date specified above.\n\nFor convenience, it is also possible to specify the cutoff date as part of the\nrepository URL, using the pattern `http://{host}/snapshot/{cutoff_date}/`.\nCutoff date can be either an RFC 3339 timestamp (e.g. `2006-12-02T02:07:43Z`)\nor a simple date (e.g., 2006-12-02). For example::\n\n   pip install --index-url http://127.0.0.1:5000/snapshot/2024-12-03 astropy\n\nWould install the requested packages and all dependencies from the date given in\nthe index URL.\n\nIt is possible to run the time machine against a custom Python package\nrepository, provided it includes date metadata as defined in PEP-700,\nspecifically the `upload-time` field::\n\n  pypi-timemachine 2021-02-03 --index-url https://my-custom-repo/simple/\n\nHow it works\n~~~~~~~~~~~~\n\n`pypi-timemachine` builds upon the `simple-repository`_ stack, and uses the\nstandards based PEP-503 repository definition to serve packages.\nIn order to filter by time, the upstream repository must provide PEP-700\nmetadata (which PyPI does).\nThe results are filtered by pypi-timemachine, and then served as HTML or JSON\nvia the standard PEP-503 interface.\n\n\nCaveats/warnings\n~~~~~~~~~~~~~~~~\n\nIf a package is already installed, pip will not try installing it again.\nThis means that if e.g. you try and run pip as described above, but the\npackage you are trying to install (or any of its dependencies) is\nalready installed, no matter how recent the version, it will not be\ninstalled again. Therefore, I recommend using pip with the custom index\nURL inside a clean environment (but you can run the ``pypi-timemachine``\ncommand inside your regular environment.)\n\n\n.. _simple-repository: https://github.com/simple-repository/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrofrog%2Fpypi-timemachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrofrog%2Fpypi-timemachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrofrog%2Fpypi-timemachine/lists"}