Skip to main content

Annotate your requirements.txt file with a short summary of each package.

Project description

Summarize Requirements 🐍 📜

Annotate your Python requirements.txt file with a short summary of each package.

This tool:

  • takes a Python requirements.txt file as input
  • fetches the summary of each package from the PyPi registry
  • outputs an equivalent requirements list with added comments summarizing each package

It can be used as a Python module or a command line script.

Example

Before:

black==21.9b0
gunicorn==20.1.0
pytz==2021.3
requests==2.26.0
rope==0.20.1
whitenoise==5.3.0

After:

black==21.9b0                            # The uncompromising code formatter.
gunicorn==20.1.0                         # WSGI HTTP Server for UNIX
pytz==2021.3                             # World timezone definitions, modern and historical
requests==2.26.0                         # Python HTTP for Humans.
rope==0.20.1                             # a python refactoring library...
whitenoise==5.3.0                        # Radically simplified static file serving for WSGI applications

Installation

Note: This is not a published package yet. For now:

git clone https://github.com/zeke/summarize-requirements
cd summarize-requirements

Command Line Usage

The CLI reads a requirements file as input and prints summarized results as output. It does not overwrite the existing file.

If you run the command with no arguments, it'll look for requirements.txt in the current directory:

python index.py

Or you can specify a different file:

python index.py ~/path/to/your/requirements.txt > new-requirements.txt

Programmatic Usage

from summarize import summarize

for line in summarize('requirements.txt'):
    print(line)

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

summarize-requirements-0.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

summarize_requirements-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file summarize-requirements-0.0.1.tar.gz.

File metadata

  • Download URL: summarize-requirements-0.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for summarize-requirements-0.0.1.tar.gz
Algorithm Hash digest
SHA256 58ae53842bf25c217ac50ae37d5f848e9e3228c21b302234808ff5b8967cd4b3
MD5 22c439dc8b9296872ddcc4c0b2250560
BLAKE2b-256 80eedac271ddc7f790747f61d9dc1bb625fc78e948f78826caac21af6ce62eac

See more details on using hashes here.

File details

Details for the file summarize_requirements-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: summarize_requirements-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for summarize_requirements-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ceaf02acbf6c5c6cd817d1300e7667afae0070bbd9fff33a6ac66f8273546bcc
MD5 0a235f0f645c6674443b9c5295e8238b
BLAKE2b-256 b4044496d8c6cad208e67038fab660ae7d30b730d09d66a650161658712414c9

See more details on using hashes here.

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