Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
Python composable command line interface toolkit
License
pallets/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.
See ourdetailed contributing documentation for many ways tocontribute, including reporting issues, requesting features, asking or answeringquestions, and making PRs.
About
Python composable command line interface toolkit
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.