Skip to main content

Colorization of help messages in Click

Project description

Colorization of help messages in Click.

Usage

import click
from click_help_colors import HelpColorsGroup, HelpColorsCommand

@click.group(
    cls=HelpColorsGroup,
    help_headers_color='yellow',
    help_options_color='green'
)
def cli():
    pass

@cli.command()
@click.option('--count', default=1, help='Some number.')
def command1(count):
    click.echo('command 1')

@cli.command(
    cls=HelpColorsCommand,
    help_options_color='blue'
)
@click.option('--name', help='Some string.')
def command2(name):
    click.echo('command 2')
$ python example.py --help
https://raw.githubusercontent.com/r-m-n/click-help-colors/master/examples/1.png
$ python example.py command1 --help
https://raw.githubusercontent.com/r-m-n/click-help-colors/master/examples/2.png
$ python example.py command2 --help
https://raw.githubusercontent.com/r-m-n/click-help-colors/master/examples/3.png

Installation

With pip:

$ pip install click-help-colors

From source:

$ git clone https://github.com/r-m-n/click-help-colors.git
$ cd click-help-colors
$ python setup.py install

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-help-colors-0.3.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file click-help-colors-0.3.tar.gz.

File metadata

File hashes

Hashes for click-help-colors-0.3.tar.gz
Algorithm Hash digest
SHA256 dd1f2de37ab30a127314423c0e20346632b7c42eb562e9afc34005635c04563f
MD5 447e347477313b290ce2a2acc1f94214
BLAKE2b-256 6a09396fed967b9f8ea10326df7b843f422c6404f004e5bdae2271eb1bb3d920

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