Install python modules from pypi from a previous date in history

Overview

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

new-requirements.txt $ pip install -r new-requirements.txt ">
$ pip-rewind --date "09/01/2020" requests > new-requirements.txt
$ pip install -r new-requirements.txt

Or give it a requirements file:

new-requirements.txt $ pip install -r new-requirements.txt ">
$ 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

You might also like...
cli simple python script to interact with iphone afc api based on python library( tidevice )
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

Zecwallet-Python is a simple wrapper around the Zecwallet Command Line LightClient written in Python

A wrapper around Zecwallet Command Line LightClient, written in Python Table of Contents About Installation Usage Examples About Zecw

Python command line tool and python engine to label table fields and fields in data files.

Python command line tool and python engine to label table fields and fields in data files. It could help to find meaningful data in your tables and data files or to find Personal identifable information (PII).

xonsh is a Python-powered, cross-platform, Unix-gazing shell
xonsh is a Python-powered, cross-platform, Unix-gazing shell

xonsh is a Python-powered, cross-platform, Unix-gazing shell language and command prompt.

A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

Dead simple CLI tool to try Python packages - It's never been easier! :package:
Dead simple CLI tool to try Python packages - It's never been easier! :package:

try - It's never been easier to try Python packages try is an easy-to-use cli tool to try out Python packages. Features Install specific package versi

Python commandline tool for remembering linux/terminal commands
Python commandline tool for remembering linux/terminal commands

ehh Remember linux commands Commandline tool for remembering linux/terminal commands. It stores your favorite commands in ~/ehh.json in your homedir a

A Telegram Bot Written In Python To Upload Medias To telegra.ph

Telegraph-Uploader A Telegram Bot Written In Python To Upload Medias To telegra.ph DEPLOY YOU CAN SIMPLY DEPLOY ON HEROKU BY CLICKING THE BUTTON BELOW

Rich is a Python library for rich text and beautiful formatting in the terminal.
Rich is a Python library for rich text and beautiful formatting in the terminal.

The Rich API makes it easy to add color and style to terminal output. Rich can also render pretty tables, progress bars, markdown, syntax highlighted source code, tracebacks, and more β€” out of the box.

Comments
  • parsing error on packages with `git+`

    parsing error on packages with `git+`

    Dependency:

    git+https://github.com/ge-semtk/[email protected]
    

    Raises an unrecoverable error for pip-rewind. Investigate

    Exception ignored in: <generator object requirements_parser at 0x7f6c8badceb0>
    Traceback (most recent call last):
      File "/home/Amar1729/.local/lib/python3.8/site-packages/pip_rewind/cli.py", line 39, in main
        version = get_first_version_before(module, args.date)
    RuntimeError: generator ignored GeneratorExit
    Traceback (most recent call last):
      File "/home/Amar1729/.local/bin/pip-rewind", line 8, in <module>
        sys.exit(main())
      File "/home/Amar1729/.local/lib/python3.8/site-packages/pip_rewind/cli.py", line 39, in main
        version = get_first_version_before(module, args.date)
      File "/home/Amar1729/.local/lib/python3.8/site-packages/pip_rewind/versions.py", line 101, in get_first_version_before
        version = get_first_version_before_rss(pkg, date)
      File "/home/Amar1729/.local/lib/python3.8/site-packages/pip_rewind/versions.py", line 53, in get_first_version_before_rss
        for version, release_date in get_versions(pkg):
      File "/home/Amar1729/.local/lib/python3.8/site-packages/pip_rewind/versions.py", line 33, in get_versions
        feed = rss_parser.Parser(xml=xml.content).parse()
      File "/home/Amar1729/.local/lib/python3.8/site-packages/rss_parser/_parser.py", line 39, in parse
        "version": main_soup.rss.get("version"),
    AttributeError: 'NoneType' object has no attribute 'get'
    
    opened by Amar1729 1
Releases(v0.1.1)
Owner
Amar Paul
Interested in security, artificial intelligence, quantum computing, physics, and colors
Amar Paul
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).

haxor-news Coworker who sees me looking at something in a browser: "Glad you're not busy; I need you to do this, this, this..." Coworker who sees me s

Donne Martin 3.8k Jan 07, 2023
Automaton - python script to execute bash command based on changes in size of a file.

automaton python script to execute given command = everytime size of a given file changes,hence everytime a file is modified.(almost) download automa

asrar bhat 1 Jan 03, 2022
An easy-to-bundle GTK terminal emulator.

EasyTerm An easy-to-bundle GTK terminal emulator. This project is meant to be used as a dependency for other

Bottles 4 May 15, 2022
A simple terminal-based localhost chat application written in python

Chat House A simple terminal-based localhost chat application written in python How to Use? Clone the repo git clone https://github.com/heksadecimal/c

Heks 10 Nov 09, 2021
Simple CLI prompt for easy I/O with OpenAI's API

openai-cli-prompt Simple CLI prompt for easy I/O with OpenAI's API Quickstart Create a .env file with: OPENAI_API_KEY=Your OpenAI API Key Configure

Erik Nomitch 1 Oct 12, 2021
Enriches Click with option groups, constraints, command aliases, help sections for subcommands, themes for --help and other stuff.

Enriches Click with option groups, constraints, command aliases, help sections for subcommands, themes for --help and other stuff.

Gianluca Gippetto 62 Dec 22, 2022
A web shell client written in python.

Webshell client A webshell client written in python. Only works well for linux for the time being. Why? Because there are too many heavy webshells. So

tchar 1 Dec 07, 2021
πŸ“¦ A command line utility to put text in a box.

boxie A command line utility to put text in a box. Installation pip install boxie If you are on Linux you may need to use sudo to access this globally

Eliaz Bobadilla 10 Jun 30, 2022
A command line tool made in Python for the popular rhythm game

osr!name A command line tool made in Python for the popular rhythm game "osu!" that changes the player name of a .osr file (replay file). Example: Not

2 Dec 28, 2021
A terminal UI dashboard to monitor requests for code review across Github and Gitlab repositories.

A terminal UI dashboard to monitor requests for code review across Github and Gitlab repositories.

Kyle Harrison 150 Dec 14, 2022
TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal.

TerminalGV So I got bored in the train, TerminalGV is a very simple client to display stats about your SNCF TGV/TER train in your terminal. The "on-tr

Samuel 8 Dec 15, 2022
Objexplore is an interactive Python object explorer for the terminal.

Objexplore is an interactive Python object explorer for the terminal. Use it while debugging, or exploring a new library, or whatever! 9D1FAC73-B2A5-4

kylepollina 249 Dec 23, 2022
A Python script for finding a food-truck based on latitude and longitude coordinates that you can run in your shell

Food Truck Finder Project Description This repository contains a Python script for finding a food-truck based on latitude and longitude coordinates th

1 Jan 22, 2022
pypyr task-runner cli & api for automation pipelines.

pypyr task-runner cli & api for automation pipelines. Automate anything by combining commands, different scripts in different languages & applications into one pipeline process.

pypyr 471 Dec 15, 2022
GitFun - A Simplified Automated CLI tool for GITπŸ˜ƒ

GitFun A Simplified Automated CLI tool for GIT, It's for Lazy Developers and Newbies 😜 Table of contents GitFun Installation Usage Development Contri

Astaqc 8 Feb 22, 2022
An open-source CLI tool for backing up RDS(PostgreSQL) Locally or to Amazon S3 bucket

An open-source CLI tool for backing up RDS(PostgreSQL) Locally or to Amazon S3 bucket

1 Oct 30, 2021
MiShell is a multi-platform, multi-architecture project based on the first version (MiShell32)

MiShell is a multi-platform, multi-architecture project based on the first version (MiShell32), which offers super super small reverse shell payloads great for injection in buffer overflow vulnerabil

Kamyar Hatamnezhad 0 Oct 27, 2022
Program Command Line Interface (CLI) Sederhana: Pemesanan Nasi Goreng Hekel

Program ini merupakan aplikasi yang berjalan di dalam command line (terminal). Program ini menggunakan built-in library python yaitu argparse yang dapat menerima parameter saat program ini dijalankan

Habib Abdurrasyid 5 Nov 19, 2021
'rl_UK' is an open-source command-line tool in Python for calculating the shortest path between BUS stop sequences in the UK

'rl_UK' is an open-source command-line tool in Python for calculating the shortest path between BUS stop sequences in the UK. As input files, it uses an ATCO-CIF file and 'OS Open Roads' dataset from

Nesh P. 0 Feb 16, 2022
AutoSub is a CLI application to generate subtitle files (.srt, .vtt, and .txt transcript) for any video file using Mozilla DeepSpeech.

AutoSub About Motivation Installation Docker How-to example How it works TO-DO Contributing References About AutoSub is a CLI application to generate

Abhiroop Talasila 414 Jan 06, 2023