Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

upgrade-requirements

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

upgrade-requirements

Upgrade all your outdated requirements in a single command.

  • 1.7.0
  • PyPI
  • Socket score

Maintainers
1

upgrade-requirements.py

Current version on PyPI

Upgrade all your outdated requirements.txt in a single command.

Motivation

Even though pip list --outdated exists, sometimes you just want to run pip install --upgrade to upgrade a package, then persist it to your requirements.txt in one big sweep.

Installation

$ pip install upgrade-requirements

Usage

$ upgrade-requirements

(Or use the shortcut command upreq.)

Now's a good time to grab a ☕ while it runs.

After it finishes, run your tests to make sure an individual upgrade didn't break anything. Then move on to bigger things 🚀

Found a problem with an upgraded version?

No worries!

  1. Revert individual entries in requirements.txt with the help of git
  2. Run pip install -r requirements.txt to downgrade to working versions
  3. Commit the upgraded-and-tweaked requirements.txt like normal and carry on 🎉
More usages
$ upgrade-requirements -h
usage: upgrade-requirements [-h] [-r REQUIREMENTS]

optional arguments:
  -h, --help            show this help message and exit
  -r REQUIREMENTS, --requirements REQUIREMENTS
                        specify the location of the requirements.txt file

Room for improvement

  • This only work with pinned (==) packages at the moment. The intention is to get it to work more generally. This can be broken down into three sub-tasks:

    • Get it to ignore non-pinned requirements instead of fail
    • Get it to work with other specifiers, e.g. >= (how would this work?)
    • Handle all types of requirement entries

Feel free to open an issue or PR with ideas.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc