Skip to main content

An extended pip installer that updates requirements.txt

Project description

pipext

pipext is a utility to enhance Python's package installer pip. With pipext, when you install or uninstall a package, it automatically manages your requirements.txt file by appending, commenting out, or uncommenting package entries as needed.

Features

  • Automatic Requirements Management: On package installation, pipext appends the installed package (with version) to requirements.txt or uncomments it if it's already there.

  • Commenting on Uninstall: On package uninstallation, instead of removing the package from requirements.txt, pipext comments it out, making it easy to keep track of previously used packages.

  • Selective Dependency Addition: Unlike traditional approaches, pipext ensures only the primary installed package is added to the requirements.txt, ignoring the dependencies that come along with them.

  • Support for Installation With Dependencies Included Commands: pipext provides support for installing packages with dependencies added into the commands such as "python -m pip install -U 'channels[daphne]'" ensuring broader compatibility.

  • Custom Requirements File Creation: Need different requirement files for different environments like production or local? pipext got you covered. Use the -e flag to specify which environment file to update. For example: pipext install -e production somepackage will update the requirements/production.txt file.

Installation

To install pipext, run:

pip install pipext

This will download and install the pipext utility from PyPI, allowing you to use it directly from your terminal or command prompt.

Usage

Install a Package

pipext install package_name

This will:

  1. Install the package using pip.
  2. Add the package with its specific version to requirements.txt or uncomment it if it's already present (but commented out).

Uninstall a Package

pipext uninstall package_name

This will:

  1. Uninstall the package using pip.
  2. Comment out the package in requirements.txt.

Install/Uninstall a Package to a Specific Environment

pipext install -e production package_name

or 

pipext uninstall -e production package_name

This will:

  1. Install/Uninstall the package using pip.
  2. Add or comment out the package with its specific version to requirements/production.txt or uncomment it if it's already present (but commented out).

Why pipext?

Managing a requirements.txt can be tedious. You install and uninstall packages during development, and sometimes it's easy to forget to update requirements.txt accordingly. pipext eases this process by automatically managing your requirements file as you modify your environment.

Contributing

Any kind of contribution is appreciatable! Please open an issue or submit a pull request on my GitHub repository.

Installation

To install pipext, run:

pip install pipext

This will download and install the pipext utility from PyPI, allowing you to use it directly from your terminal or command prompt.

Usage

Install a Package

pipext install package_name

This will:

  1. Install the package using pip.
  2. Add the package with its specific version to requirements.txt or uncomment it if it's already present (but commented out).

Install a Package to a Specific Environment

pipext install -e production package_name

This will:

  1. Install the package using pip.
  2. Add the package with its specific version to requirements/production.txt or uncomment it if it's already present (but commented out).

Uninstall a Package

pipext uninstall package_name

This will:

  1. Uninstall the package using pip.
  2. Comment out the package in requirements.txt.

Why pipext?

Managing a requirements.txt can be tedious. You install and uninstall packages during development, and sometimes it's easy to forget to update requirements.txt accordingly. pipext eases this process by automatically managing your requirements file as you modify your environment.

Contributing

Any kind of contribution is appreciatable! Please open an issue or submit a pull request on my GitHub repository.


These changes should adequately communicate the new functionalities of your package!

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

pipext-0.2.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipext-0.2.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pipext-0.2.1.tar.gz.

File metadata

  • Download URL: pipext-0.2.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for pipext-0.2.1.tar.gz
Algorithm Hash digest
SHA256 78b577f66ef411e3721dcd61fb88e949c8ccaf71a97f04e37e5e439034d28833
MD5 7020ed85b875fbef6d983ee3674a7254
BLAKE2b-256 716a01590d05c5f4f5f48e019e5302e6c736ef93223a8582e03f1e6c61ed2a1d

See more details on using hashes here.

File details

Details for the file pipext-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pipext-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for pipext-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bfb7494b2bfaecac6a5fd937216fe9076ef923d50a9a6f25df5943274ec375a7
MD5 53985c13fbc7efe05394fdf19a3566f4
BLAKE2b-256 3b0310fd594625e14d1be6eed97b2acf099d05c239ada642e04f86567361b94e

See more details on using hashes here.

Supported by

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