Skip to main content

A dynamic tool for upgrading pip requirements that seamlessly synchronizes the version changes within your requirements.txt file.

Project description

pip-ascent

A versatile tool for effortlessly updating pip requirements while keeping your requirements.txt file in sync with the latest package versions. No more tedious manual package-by-package upgrades; this tool handles it for you and updates your requirements.txt file accordingly.

Purpose

This command-line tool allows you to interactively (or non-interactively) upgrade packages from your requirements file. It also enables you to update the pinned version in your requirements file(s). If no requirements are specified, the tool will attempt to detect the requirements file(s) in the current directory.

Installation

pip install pip-ascent

Note: This package installs the following dependencies: 'docopt', 'packaging', 'requests', 'terminaltables', 'colorclass'. To avoid installing these dependencies in your project, you can install pip-ascent in your system rather than your virtual environment. If you install it in your system and need to upgrade it, run pip install -U pip-ascent.

Usage

pip-ascent [<requirements_file>] ... [--prerelease] [-pk=<package>...] [--dry-run] [--check-greater-equal] [--skip-virtualenv-check] [--skip-package-installation] [--use-default-index]

Activate your virtual environment (important because it will also install the new versions of upgraded packages in the current virtual environment).

Change directory into your project. Then:

$ pip-ascent

Arguments:

  • requirements_file: Specifies the requirement file or uses a wildcard path to multiple files.
  • --prerelease: Includes prerelease versions for upgrades when querying PyPI repositories.
  • -pk <package>: Pre-selects packages for an upgrade, bypassing any prompts. You can also utilize regular expressions to filter packages for upgrading.
  • --dry-run: Simulates the upgrade but does not perform the actual upgrade.
  • --check-greater-equal: Also checks packages with minimum version pinning (package>=version).
  • --skip-package-installation: Upgrades the version in requirement files only; it does not install the new package.
  • --skip-virtualenv-check: Disables virtual environment check, permitting the installation of new packages outside the virtual environment.
  • --use-default-index: Skips searching for a custom index URL in pip configuration file(s).

Examples:

  • pip-ascent: Automatically discovers the requirements file.

  • pip-ascent requirements.txt

  • pip-ascent requirements/dev.txt requirements/production.txt

  • pip-ascent requirements.txt -pk django -pk celery

  • pip-ascent requirements.txt -pk all

  • pip-ascent requirements.txt --dry-run: Runs everything as a simulation (does not perform the actual upgrade)

💖 Like this project?

Leave a ⭐ if you find this project cool.

Share with the world

👨‍💻 Author

Abdulazeez Sherif

Twitter

🍁 License

MIT

Note: This package is just starting out feel free to make contributions.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pip_ascent-0.1.2.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

pip_ascent-0.1.2-py2.py3-none-any.whl (23.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page