- Notifications
You must be signed in to change notification settings - Fork0
Python composable command line interface toolkit
License
Rowlando13/click
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Click is a Python package for creating beautiful command line interfacesin a composable way with as little code as necessary. It's the "CommandLine Interface Creation Kit". It's highly configurable but comes withsensible defaults out of the box.
It aims to make the process of writing command line tools quick and funwhile also preventing any frustration caused by the inability toimplement an intended CLI API.
Click in three points:
- Arbitrary nesting of commands
- Automatic help page generation
- Supports lazy loading of subcommands at runtime
importclick@click.command()@click.option("--count",default=1,help="Number of greetings.")@click.option("--name",prompt="Your name",help="The person to greet.")defhello(count,name):"""Simple program that greets NAME for a total of COUNT times."""for_inrange(count):click.echo(f"Hello,{name}!")if__name__=='__main__':hello()
$ python hello.py --count=3Your name: ClickHello, Click!Hello, Click!Hello, Click!
The Pallets organization develops and supports Click and other popularpackages. In order to grow the community of contributors and users, andallow the maintainers to devote more time to the projects,pleasedonate today.
About
Python composable command line interface toolkit
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- Python100.0%