Skip to content
Myr

README.rst

This file

Path

README.rst

87 lines · 2.2 KiB

Last changed by

fix azure configDavid Lordbefore adoptionc2efed8

History of this file

Take it

1\$ 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 click2829Click supports Python 3.4 and newer, Python 2.7, and PyPy.3031.. _pip: https://pip.pypa.io/en/stable/quickstart/323334A Simple Example35----------------3637What does it look like? Here is an example of a simple Click program:3839.. code-block:: python4041    import click4243    @click.command()44    @click.option("--count", default=1, help="Number of greetings.")45    @click.option("--name", prompt="Your name",46                  help="The person to greet.")47    def hello(count, name):48        """Simple program that greets NAME for a total of COUNT times."""49        for _ in range(count):50            click.echo("Hello, %s!" % name)5152    if __name__ == '__main__':53        hello()5455And what it looks like when run:5657.. code-block:: text5859    $ python hello.py --count=360    Your name: Click61    Hello, Click!62    Hello, Click!63    Hello, Click!646566Donate67------6869The Pallets organization develops and supports Click and other popular70packages. In order to grow the community of contributors and users, and71allow the maintainers to devote more time to the projects, `please72donate today`_.7374.. _please donate today: https://palletsprojects.com/donate757677Links78-----7980*   Website: https://palletsprojects.com/p/click/81*   Documentation: https://click.palletsprojects.com/82*   License: `BSD <https://github.com/pallets/click/blob/master/LICENSE.rst>`_83*   Releases: https://pypi.org/project/click/84*   Code: https://github.com/pallets/click85*   Issue tracker: https://github.com/pallets/click/issues86*   Test status: https://dev.azure.com/pallets/click/_build87*   Official chat: https://discord.gg/t6rrQZH