Skip to content
Myr

README.md

This file

Path

README.md

62 lines · 1.7 KiB · Markdown

Last changed by

svg logoDavid Lordbefore adoption2865034

History of this file

Take it

svg logoDavid Lordbefore adoption2865034

line 1why, one step back
1<div align="center"><img src="https://raw.githubusercontent.com/pallets/click/refs/heads/stable/docs/_static/click-name.svg" alt="" height="150"></div>

new logo (#2974)David Lordbefore adoptiond2e0fb5

lines 2–3why, one step back
2
3# Click

Merge branch '8.1.x'David Lordbefore adoption73cfe12

lines 4–54why, one step back
4
5Click is a Python package for creating beautiful command line interfaces6in a composable way with as little code as necessary. It's the "Command7Line Interface Creation Kit". It's highly configurable but comes with8sensible defaults out of the box.910It aims to make the process of writing command line tools quick and fun11while also preventing any frustration caused by the inability to12implement an intended CLI API.1314Click in three points:1516- Arbitrary nesting of commands17- Automatic help page generation18- Supports lazy loading of subcommands at runtime192021## A Simple Example2223```python24import click2526@click.command()27@click.option("--count", default=1, help="Number of greetings.")28@click.option("--name", prompt="Your name", help="The person to greet.")29def hello(count, name):30 """Simple program that greets NAME for a total of COUNT times."""31 for _ in range(count):32 click.echo(f"Hello, {name}!")3334if __name__ == '__main__':35 hello()36```3738```39$ python hello.py --count=340Your name: Click41Hello, Click!42Hello, Click!43Hello, Click!44```454647## Donate4849The Pallets organization develops and supports Click and other popular50packages. In order to grow the community of contributors and users, and51allow the maintainers to devote more time to the projects, [please52donate today][].5354[please donate today]: https://palletsprojects.com/donate

Merge `stable` into `main`; Release 8.2.0 (#2873)Rowlando13before adoptionb7c0ab4

lines 55–62why, one step back
55
56## Contributing5758See our [detailed contributing documentation][contrib] for many ways to59contribute, including reporting issues, requesting features, asking or answering60questions, and making PRs.6162[contrib]: https://palletsprojects.com/contributing/