• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

artwork/H03-May-2022-

docs/H03-May-2022-5,2153,693

examples/H10-Oct-2021-1,4161,085

requirements/H03-May-2022-

src/H10-Oct-2021-10,0507,631

tests/H10-Oct-2021-5,5054,264

CHANGES.rstH A D10-Oct-202139.1 KiB935803

LICENSE.rstH A D04-Mar-20211.4 KiB2923

MANIFEST.inH A D08-Oct-2021181 1110

PKG-INFOH A D10-Oct-20213.1 KiB11081

README.rstH A D08-Oct-20212 KiB8155

setup.cfgH A D10-Oct-20212 KiB9381

setup.pyH A D08-Oct-2021191 108

tox.iniH A D08-Oct-2021525 2520

README.rst

1\$ click\_
2==========
3
4Click is a Python package for creating beautiful command line interfaces
5in a composable way with as little code as necessary. It's the "Command
6Line Interface Creation Kit". It's highly configurable but comes with
7sensible defaults out of the box.
8
9It aims to make the process of writing command line tools quick and fun
10while also preventing any frustration caused by the inability to
11implement an intended CLI API.
12
13Click in three points:
14
15-   Arbitrary nesting of commands
16-   Automatic help page generation
17-   Supports lazy loading of subcommands at runtime
18
19
20Installing
21----------
22
23Install and update using `pip`_:
24
25.. code-block:: text
26
27    $ pip install -U click
28
29.. _pip: https://pip.pypa.io/en/stable/getting-started/
30
31
32A Simple Example
33----------------
34
35.. code-block:: python
36
37    import click
38
39    @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}!")
46
47    if __name__ == '__main__':
48        hello()
49
50.. code-block:: text
51
52    $ python hello.py --count=3
53    Your name: Click
54    Hello, Click!
55    Hello, Click!
56    Hello, Click!
57
58
59Donate
60------
61
62The Pallets organization develops and supports Click and other popular
63packages. In order to grow the community of contributors and users, and
64allow the maintainers to devote more time to the projects, `please
65donate today`_.
66
67.. _please donate today: https://palletsprojects.com/donate
68
69
70Links
71-----
72
73-   Documentation: https://click.palletsprojects.com/
74-   Changes: https://click.palletsprojects.com/changes/
75-   PyPI Releases: https://pypi.org/project/click/
76-   Source Code: https://github.com/pallets/click
77-   Issue Tracker: https://github.com/pallets/click/issues
78-   Website: https://palletsprojects.com/p/click
79-   Twitter: https://twitter.com/PalletsTeam
80-   Chat: https://discord.gg/pallets
81