https://click.palletsprojects.com/en/7.x/documentation/
option
幫助信息
help
參數來填寫幫助信息
@click.command()
@click.option('--count', default=1, help='number of greetings')
@click.argument('name')
def hello(count, name):
"""This script prints hello NAME COUNT times."""
for x in range(count):
click.echo('Hello %s!' % name)
Arguments
幫助信息
@click.command()
@click.argument('filename')
def touch(filename):
"""Print FILENAME."""
click.echo(filename)
$ touch --help
Usage: touch [OPTIONS] FILENAME
Print FILENAME.
Options:
--help Show this message and exit.