| 1 |
Metadata-Version: 2.1 |
| 2 |
Name: click |
| 3 |
Version: 8.1.7 |
| 4 |
Summary: Composable command line interface toolkit |
| 5 |
Home-page: https://palletsprojects.com/p/click/ |
| 6 |
Maintainer: Pallets |
| 7 |
Maintainer-email: [email protected] |
| 8 |
License: BSD-3-Clause |
| 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" |
| 25 |
|
| 26 |
\$ click\_ |
| 27 |
========== |
| 28 |
|
| 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. |
| 33 |
|
| 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. |
| 37 |
|
| 38 |
Click in three points: |
| 39 |
|
| 40 |
- Arbitrary nesting of commands |
| 41 |
- Automatic help page generation |
| 42 |
- Supports lazy loading of subcommands at runtime |
| 43 |
|
| 44 |
|
| 45 |
Installing |
| 46 |
---------- |
| 47 |
|
| 48 |
Install and update using `pip`_: |
| 49 |
|
| 50 |
.. code-block:: text |
| 51 |
|
| 52 |
$ pip install -U click |
| 53 |
|
| 54 |
.. _pip: https://pip.pypa.io/en/stable/getting-started/ |
| 55 |
|
| 56 |
|
| 57 |
A Simple Example |
| 58 |
---------------- |
| 59 |
|
| 60 |
.. code-block:: python |
| 61 |
|
| 62 |
import click |
| 63 |
|
| 64 |
@click.command() |
| 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}!") |
| 71 |
|
| 72 |
if __name__ == '__main__': |
| 73 |
hello() |
| 74 |
|
| 75 |
.. code-block:: text |
| 76 |
|
| 77 |
$ python hello.py --count=3 |
| 78 |
Your name: Click |
| 79 |
Hello, Click! |
| 80 |
Hello, Click! |
| 81 |
Hello, Click! |
| 82 |
|
| 83 |
|
| 84 |
Donate |
| 85 |
------ |
| 86 |
|
| 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 |
| 90 |
donate today`_. |
| 91 |
|
| 92 |
.. _please donate today: https://palletsprojects.com/donate |
| 93 |
|
| 94 |
|
| 95 |
Links |
| 96 |
----- |
| 97 |
|
| 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 |