index.rst
This file
Path
docs/index.rst
99 lines · 2.1 KiB
Last changed by
Add documentation for click-contribMarkus Unterwaditzerbefore adoptionf682a43
History of this fileTake it
The walk stopped after 200 commits: lines older than cf8f1b7 point at it.
progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 1–3why, one step back1Welcome to the Click Documentation2==================================3Documentation fixesKevin Yapbefore adoption67523af
line 4why, one step back4Click is a Python package for creating beautiful command line interfacesMerge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
lines 5–7why, 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 with7sensible defaults out of the box.progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
line 8why, one step back8Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
lines 9–11why, one step back9It aims to make the process of writing command line tools quick and fun10while also preventing any frustration caused by the inability to implement11an intended CLI API.progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 12–18why, one step back1213Click in three points:1415- arbitrary nesting of commands16- automatic help page generation17- supports lazy loading of subcommands at runtime18Merge pull request #153 from iKevinY/click-renameArmin Ronacherbefore adoption327cfde
line 19why, one step back19What does it look like? Here is an example of a simple Click program:progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 20–36why, one step back2021.. click:example::2223 import click2425 @click.command()26 @click.option('--count', default=1, help='Number of greetings.')27 @click.option('--name', prompt='Your name',28 help='The person to greet.')29 def hello(count, name):30 """Simple program that greets NAME for a total of COUNT times."""31 for x in range(count):32 click.echo('Hello %s!' % name)3334 if __name__ == '__main__':35 hello()36Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
line 37why, one step back37And what it looks like when run:progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 38–40why, one step back3839.. click:run::40Rewrote the setuptools documentation.Armin Ronacherbefore adoption61b6ffa
line 41why, one step back41 invoke(hello, ['--count=3'], prog_name='python hello.py', input='John\n')progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
line 42why, one step back42Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
line 43why, one step back43It automatically generates nicely formatted help pages:progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 44–46why, one step back4445.. click:run::46Rewrote the setuptools documentation.Armin Ronacherbefore adoption61b6ffa
line 47why, one step back47 invoke(hello, ['--help'], prog_name='python hello.py')progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 48–55why, one step back4849You can get the library directly from PyPI::5051 pip install click5253Documentation Contents54----------------------55Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
lines 56–57why, one step back56This part of the documentation guides you through all of the library's57usage patterns.progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 58–63why, one step back5859.. toctree::60 :maxdepth: 26162 why63 quickstartRewrote the setuptools documentation.Armin Ronacherbefore adoption61b6ffa
line 64why, one step back64 setuptoolsprogressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 65–75why, one step back65 parameters66 options67 arguments68 commands69 prompts70 documentation71 complex72 advanced73 testing74 utils75 bashcompleteAdded a way to disable the standalone mode on main.Armin Ronacherbefore adoption6a559ec
line 76why, one step back76 exceptionsprogressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 77–81why, one step back77 python37879API Reference80-------------81Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
line 82why, one step back82If you are looking for information on a specific function, class, orprogressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 83–89why, one step back83method, this part of the documentation is for you.8485.. toctree::86 :maxdepth: 28788 api89Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd
lines 90–91why, one step back90Miscellaneous Pages91-------------------progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 92–95why, one step back9293.. toctree::94 :maxdepth: 295Add documentation for click-contribMarkus Unterwaditzerbefore adoptionf682a43
line 96why, one step back96 contribprogressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7
lines 97–99why, one step back97 changelog98 upgrading99 license