Skip to main content

No project description provided

Project description

click-summarizer

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install click-summarizer

Usage: Command Line

click-summarizer --help
click-summarizer click_summarizer.cli summarize_cli

# Use it for other click-based cli apps.
click-summarizer dataset_sh.cli cli
click-summarizer dataset_sh.cli cli --no-doc

Usage: Python

Assuming you have a click app like this:

@click.group()
@click.option('--verbose', is_flag=True, help='Enable verbose mode.')
def my_cli(verbose):
    """Main CLI group."""
    pass

@my_cli.command()
@click.option('--name', prompt='Your name', help='The person to greet.')
@click.argument('times', type=int)
def greet(name, times):
    """Greet someone a number of times."""
    for _ in range(times):
        click.echo(f"Hello, {name}!")

@my_cli.group()
def math():
    """Math operations."""
    pass

@math.command()
@click.argument('x', type=int)
@click.argument('y', type=int)
def add(x, y):
    """Add two numbers."""
    click.echo(x + y)

@math.command()
@click.argument('x', type=int)
@click.argument('y', type=int)
def subtract(x, y):
    """Subtract two numbers."""
    click.echo(x - y)
from click_summarizer import summarize_click_command
out = summarize_click_command(my_cli, show_help=True, show_options=True)
print(out.getvalue())

License

click-summarizer is distributed under the terms of the MIT license.

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

click_summarizer-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

click_summarizer-0.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file click_summarizer-0.0.1.tar.gz.

File metadata

  • Download URL: click_summarizer-0.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for click_summarizer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8ba1959367f2194f1931c7c3dd9a4972184e234560836031c7cd8c62db5828a6
MD5 ed6b51b53ff92c3c95b5b43dd223795c
BLAKE2b-256 e05aac989426e574a7c91d9580fe2401cb1e7b0af84a057cc1fff9e24f39a7a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for click_summarizer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63bdd13e6a32a745d6583973e1e32b086fd950a55afb5940f63c39a434ca0eda
MD5 5440b76c21cdce016ce1be52fa0805cf
BLAKE2b-256 de8a58817e570fbf2f3f9d2b401fb74a9a46ac815b80966ad8b165da01653cb6

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