Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 1.27 KB

Click.md

File metadata and controls

57 lines (45 loc) · 1.27 KB

Click

Make composable Python command line applications.

Documentation

See official documentation: http://click.pocoo.org/latest/

Hello, World!

An example with a command and a couple options:

import click

@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name',
              help='The person to greet.')
def hello(count, name):
    """Simple program that greets NAME for a total of COUNT times."""
    for x in range(count):
        click.echo('Hello %s!' % name)

if __name__ == '__main__':
    hello()

Examples

Tutorial

https://github.com/tylerdave/Click-Tutorial