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 fileTake it
Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 1–4why, one step back1\$ click\_2==========34Click is a Python package for creating beautiful command line interfacesMerge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 5–6why, one step back5in a composable way with as little code as necessary. It's the "Command6Line Interface Creation Kit". It's highly configurable but comes withMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 7–9why, one step back7sensible defaults out of the box.89It aims to make the process of writing command line tools quick and funMerge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
lines 10–11why, one step back10while also preventing any frustration caused by the inability to11implement an intended CLI API.Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 12–14why, one step back1213Click in three points:14Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 15–17why, one step back15- Arbitrary nesting of commands16- Automatic help page generation17- Supports lazy loading of subcommands at runtimeMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
line 18why, one step back18Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
line 19why, one step back19Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 20–26why, one step back20Installing21----------2223Install and update using `pip`_:2425.. code-block:: text26Merge branch '7.x'David Lordbefore adoption8f36eab
line 27why, one step back27 $ pip install -U clickMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
line 28why, one step back28Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
lines 29–31why, one step back29.. _pip: https://pip.pypa.io/en/stable/quickstart/3031Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 32–37why, one step back32A Simple Example33----------------3435.. code-block:: python3637 import clickMerge branch '7.x'David Lordbefore adoptiona438322
line 38why, one step back38Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
line 39why, one step back39 @click.command()Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
line 40why, one step back40 @click.option("--count", default=1, help="Number of greetings.")Merge branch '7.x'David Lordbefore adoption7239794
line 41why, one step back41 @click.option("--name", prompt="Your name", help="The person to greet.")Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 42–43why, one step back42 def hello(count, name):43 """Simple program that greets NAME for a total of COUNT times."""Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
line 44why, one step back44 for _ in range(count):Merge branch '7.x'David Lordbefore adoption7239794
line 45why, one step back45 click.echo(f"Hello, {name}!")Merge branch '7.x'David Lordbefore adoptiona438322
line 46why, one step back46Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 47–52why, one step back47 if __name__ == '__main__':48 hello()4950.. code-block:: text5152 $ python hello.py --count=3Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 53–56why, one step back53 Your name: Click54 Hello, Click!55 Hello, Click!56 Hello, Click!Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
line 57why, one step back57Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
line 58why, one step back58Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 59–61why, one step back59Donate60------61Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 62–63why, one step back62The Pallets organization develops and supports Click and other popular63packages. In order to grow the community of contributors and users, andMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 64–66why, one step back64allow the maintainers to devote more time to the projects, `please65donate today`_.66Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
line 67why, one step back67.. _please donate today: https://palletsprojects.com/donateMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 68–72why, one step back686970Links71-----72Merge branch '7.x'David Lordbefore adoption8f36eab
lines 73–79why, one step back73- 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