4 Summary: Composable command line interface toolkit
5 Home-page: https://palletsprojects.com/p/click/
7 Maintainer-email: contact@palletsprojects.com
9 Project-URL: Donate, https://palletsprojects.com/donate
10 Project-URL: Documentation, https://click.palletsprojects.com/
11 Project-URL: Changes, https://click.palletsprojects.com/changes/
12 Project-URL: Source Code, https://github.com/pallets/click/
13 Project-URL: Issue Tracker, https://github.com/pallets/click/issues/
14 Project-URL: Chat, https://discord.gg/pallets
15 Classifier: Development Status :: 5 - Production/Stable
16 Classifier: Intended Audience :: Developers
17 Classifier: License :: OSI Approved :: BSD License
18 Classifier: Operating System :: OS Independent
19 Classifier: Programming Language :: Python
20 Requires-Python: >=3.7
21 Description-Content-Type: text/x-rst
22 License-File: LICENSE.rst
23 Requires-Dist: colorama ; platform_system == "Windows"
24 Requires-Dist: importlib-metadata ; python_version < "3.8"
29 Click is a Python package for creating beautiful command line interfaces
30 in a composable way with as little code as necessary. It's the "Command
31 Line Interface Creation Kit". It's highly configurable but comes with
32 sensible defaults out of the box.
34 It aims to make the process of writing command line tools quick and fun
35 while also preventing any frustration caused by the inability to
36 implement an intended CLI API.
38 Click in three points:
40 - Arbitrary nesting of commands
41 - Automatic help page generation
42 - Supports lazy loading of subcommands at runtime
48 Install and update using `pip`_:
52 $ pip install -U click
54 .. _pip: https://pip.pypa.io/en/stable/getting-started/
60 .. code-block:: python
65 @click.option("--count", default=1, help="Number of greetings.")
66 @click.option("--name", prompt="Your name", help="The person to greet.")
67 def hello(count, name):
68 """Simple program that greets NAME for a total of COUNT times."""
69 for _ in range(count):
70 click.echo(f"Hello, {name}!")
72 if __name__ == '__main__':
77 $ python hello.py --count=3
87 The Pallets organization develops and supports Click and other popular
88 packages. In order to grow the community of contributors and users, and
89 allow the maintainers to devote more time to the projects, `please
92 .. _please donate today: https://palletsprojects.com/donate
98 - Documentation: https://click.palletsprojects.com/
99 - Changes: https://click.palletsprojects.com/changes/
100 - PyPI Releases: https://pypi.org/project/click/
101 - Source Code: https://github.com/pallets/click
102 - Issue Tracker: https://github.com/pallets/click/issues
103 - Chat: https://discord.gg/pallets