Skip to main content

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)

Metadata

Release files for summarize-requirements 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for summarize-requirements 0.0.1
File Size Uploaded
summarize-requirements-0.0.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for summarize-requirements 0.0.1
File Interpreter ABI Platform
summarize_requirements-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / summarize-requirements-0.0.1.tar.gz

Download URL summarize-requirements-0.0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
58ae53842bf25c217ac50ae37d5f848e9e3228c21b302234808ff5b8967cd4b3
BLAKE2b-256 checksum
How to use checksums
80eedac271ddc7f790747f61d9dc1bb625fc78e948f78826caac21af6ce62eac
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / summarize_requirements-0.0.1-py3-none-any.whl

Download URL summarize_requirements-0.0.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ceaf02acbf6c5c6cd817d1300e7667afae0070bbd9fff33a6ac66f8273546bcc
BLAKE2b-256 checksum
How to use checksums
b4044496d8c6cad208e67038fab660ae7d30b730d09d66a650161658712414c9
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page