Skip to content
Myr

README.rst

This file

Path

README.rst

79 lines · 2.0 KiB

Last changed by

Merge branch '7.x'David Lordbefore adoption7239794

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 -U click2829.. _pip: https://pip.pypa.io/en/stable/quickstart/303132A 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-   Website: https://palletsprojects.com/p/click/74-   Documentation: https://click.palletsprojects.com/75-   Releases: https://pypi.org/project/click/76-   Code: https://github.com/pallets/click77-   Issue tracker: https://github.com/pallets/click/issues78-   Test status: https://dev.azure.com/pallets/click/_build79-   Official chat: https://discord.gg/t6rrQZH