README.md
This file
Path
README.md
62 lines · 1.7 KiB · Markdown
Last changed by
svg logoDavid Lordbefore adoption2865034
History of this fileTake it
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263<div align="center"><img src="https://raw.githubusercontent.com/pallets/click/refs/heads/stable/docs/_static/click-name.svg" alt="" height="150"></div>
# Click
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
## A Simple Example
```pythonimport 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 _ in range(count): click.echo(f"Hello, {name}!")
if __name__ == '__main__': hello()```
```$ python hello.py --count=3Your name: ClickHello, Click!Hello, Click!Hello, Click!```
## Donate
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][].
[please donate today]: https://palletsprojects.com/donate
## Contributing
See our [detailed contributing documentation][contrib] for many ways tocontribute, including reporting issues, requesting features, asking or answeringquestions, and making PRs.
[contrib]: https://palletsprojects.com/contributing/