README.rst
This file
Path
README.rst
80 lines · 2.0 KiB
Last changed by
Merge remote-tracking branch 'origin/8.0.x'David Lordbefore adoptionc3687bf
History of this fileTake it
The walk stopped after 200 commits: lines older than c3eac6b point at it.
Merge branch '7.x'David Lordbefore adoptionc3eac6b
lines 1–28why, one step back1\$ click\_2==========34Click is a Python package for creating beautiful command line interfaces5in a composable way with as little code as necessary. It's the "Command6Line Interface Creation Kit". It's highly configurable but comes with7sensible defaults out of the box.89It aims to make the process of writing command line tools quick and fun10while also preventing any frustration caused by the inability to11implement an intended CLI API.1213Click in three points:1415- Arbitrary nesting of commands16- Automatic help page generation17- Supports lazy loading of subcommands at runtime181920Installing21----------2223Install and update using `pip`_:2425.. code-block:: text2627 $ pip install -U click28Merge remote-tracking branch 'origin/8.0.x'David Lordbefore adoptionc3687bf
line 29why, one step back29.. _pip: https://pip.pypa.io/en/stable/getting-started/Merge branch '7.x'David Lordbefore adoptionc3eac6b
lines 30–73why, one step back303132A Simple Example33----------------3435.. code-block:: python3637 import click3839 @click.command()40 @click.option("--count", default=1, help="Number of greetings.")41 @click.option("--name", prompt="Your name", help="The person to greet.")42 def hello(count, name):43 """Simple program that greets NAME for a total of COUNT times."""44 for _ in range(count):45 click.echo(f"Hello, {name}!")4647 if __name__ == '__main__':48 hello()4950.. code-block:: text5152 $ python hello.py --count=353 Your name: Click54 Hello, Click!55 Hello, Click!56 Hello, Click!575859Donate60------6162The Pallets organization develops and supports Click and other popular63packages. In order to grow the community of contributors and users, and64allow the maintainers to devote more time to the projects, `please65donate today`_.6667.. _please donate today: https://palletsprojects.com/donate686970Links71-----7273- Documentation: https://click.palletsprojects.com/Merge pull request #1792 from pallets/consistencyDavid Lordbefore adoption98e471f
lines 74–80why, one step back74- Changes: https://click.palletsprojects.com/changes/75- PyPI Releases: https://pypi.org/project/click/76- Source Code: https://github.com/pallets/click77- Issue Tracker: https://github.com/pallets/click/issues78- Website: https://palletsprojects.com/p/click79- Twitter: https://twitter.com/PalletsTeam80- Chat: https://discord.gg/pallets