Skip to content
Myr

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 file

Take 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 back
1Welcome to the Click Documentation
2==================================3

Documentation fixesKevin Yapbefore adoption67523af

line 4why, one step back
4Click is a Python package for creating beautiful command line interfaces

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

lines 5–7why, one step back
5in a composable way with as little code as necessary. It's the "Command
6Line 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 back
8

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

lines 9–11why, one step back
9It aims to make the process of writing command line tools quick and fun
10while 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 back
12
13Click in three points:1415- arbitrary nesting of commands16- automatic help page generation17- supports lazy loading of subcommands at runtime18

Merge pull request #153 from iKevinY/click-renameArmin Ronacherbefore adoption327cfde

line 19why, one step back
19What 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 back
20
21.. 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()36

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

line 37why, one step back
37And what it looks like when run:

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 38–40why, one step back
38
39.. click:run::40

Rewrote the setuptools documentation.Armin Ronacherbefore adoption61b6ffa

line 41why, one step back
41 invoke(hello, ['--count=3'], prog_name='python hello.py', input='John\n')

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

line 42why, one step back
42

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

line 43why, one step back
43It automatically generates nicely formatted help pages:

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 44–46why, one step back
44
45.. click:run::46

Rewrote the setuptools documentation.Armin Ronacherbefore adoption61b6ffa

line 47why, one step back
47 invoke(hello, ['--help'], prog_name='python hello.py')

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 48–55why, one step back
48
49You can get the library directly from PyPI::5051 pip install click5253Documentation Contents54----------------------55

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

lines 56–57why, one step back
56This part of the documentation guides you through all of the library's
57usage patterns.

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 58–63why, one step back
58
59.. toctree::60 :maxdepth: 26162 why63 quickstart

Rewrote the setuptools documentation.Armin Ronacherbefore adoption61b6ffa

line 64why, one step back
64 setuptools

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 65–75why, one step back
65 parameters
66 options67 arguments68 commands69 prompts70 documentation71 complex72 advanced73 testing74 utils75 bashcomplete

Added a way to disable the standalone mode on main.Armin Ronacherbefore adoption6a559ec

line 76why, one step back
76 exceptions

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 77–81why, one step back
77 python3
7879API Reference80-------------81

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

line 82why, one step back
82If you are looking for information on a specific function, class, or

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 83–89why, one step back
83method, this part of the documentation is for you.
8485.. toctree::86 :maxdepth: 28788 api89

Merge pull request #125 from iKevinY/doc-fixesArmin Ronacherbefore adoption1d25afd

lines 90–91why, one step back
90Miscellaneous Pages
91-------------------

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 92–95why, one step back
92
93.. toctree::94 :maxdepth: 295

Add documentation for click-contribMarkus Unterwaditzerbefore adoptionf682a43

line 96why, one step back
96 contrib

progressbar: add automatic full-width modeArmin Ronacherbefore adoptioncf8f1b7

lines 97–99why, one step back
97 changelog
98 upgrading99 license