README.rst
This file
Path
README.rst
87 lines · 2.2 KiB
Last changed by
fix azure configDavid Lordbefore adoptionc2efed8
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–28why, one step back20Installing21----------2223Install and update using `pip`_:2425.. code-block:: text2627 $ pip install click28Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
line 29why, one step back29Click supports Python 3.4 and newer, Python 2.7, and PyPy.Merge pull request #1004 from dougharris/versions-743Dan Sullybefore adoptiona00e018
line 30why, one step back30Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
lines 31–33why, one step back31.. _pip: https://pip.pypa.io/en/stable/quickstart/3233Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 34–41why, one step back34A Simple Example35----------------3637What does it look like? Here is an example of a simple Click program:3839.. code-block:: python4041 import clickfix azure configDavid Lordbefore adoptionc2efed8
line 42why, one step back42Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
line 43why, one step back43 @click.command()Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 44–46why, one step back44 @click.option("--count", default=1, help="Number of greetings.")45 @click.option("--name", prompt="Your name",46 help="The person to greet.")Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 47–48why, one step back47 def hello(count, name):48 """Simple program that greets NAME for a total of COUNT times."""Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 49–50why, one step back49 for _ in range(count):50 click.echo("Hello, %s!" % name)fix azure configDavid Lordbefore adoptionc2efed8
line 51why, one step back51Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 52–59why, one step back52 if __name__ == '__main__':53 hello()5455And what it looks like when run:5657.. code-block:: text5859 $ python hello.py --count=3Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 60–63why, one step back60 Your name: Click61 Hello, Click!62 Hello, Click!63 Hello, Click!Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
line 64why, one step back64Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
line 65why, one step back65Merge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 66–68why, one step back66Donate67------68Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
lines 69–70why, one step back69The Pallets organization develops and supports Click and other popular70packages. In order to grow the community of contributors and users, andMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 71–73why, one step back71allow the maintainers to devote more time to the projects, `please72donate today`_.73Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
line 74why, one step back74.. _please donate today: https://palletsprojects.com/donateMerge pull request #990 from dougharris/click-readmeDavid Lordbefore adoptiondf1a8f5
lines 75–79why, one step back757677Links78-----79Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
lines 80–81why, one step back80* Website: https://palletsprojects.com/p/click/81* Documentation: https://click.palletsprojects.com/Merge pull request #1120 from pallets/metaDavid Lordbefore adoptionb4d25f8
line 82why, one step back82* License: `BSD <https://github.com/pallets/click/blob/master/LICENSE.rst>`_Merge pull request #1100 from pallets/sphinxDavid Lordbefore adoptionb1b8c48
lines 83–85why, one step back83* Releases: https://pypi.org/project/click/84* Code: https://github.com/pallets/click85* Issue tracker: https://github.com/pallets/click/issuesfix azure configDavid Lordbefore adoptionc2efed8
line 86why, one step back86* Test status: https://dev.azure.com/pallets/click/_buildAdd Discord server link to README (#1290)Peter Landollbefore adoptionafff366
line 87why, one step back87* Official chat: https://discord.gg/t6rrQZH