Skip to content
Myr

index.rst

This file

Path

docs/index.rst

100 lines · 2.1 KiB

Last changed by

Documented wincmdArmin Ronacherbefore adoption7e8da4b

History of this file

Take it

The walk stopped after 200 commits: lines older than e413626 point at it.

Added some docs on return values from commandsArmin Ronacherbefore adoptione413626

lines 1–77why, one step back
1Welcome to the Click Documentation
2==================================34Click is a Python package for creating beautiful command line interfaces5in 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.89It 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.1213Click in three points:1415- arbitrary nesting of commands16- automatic help page generation17- supports lazy loading of subcommands at runtime1819What does it look like? Here is an example of a simple Click program:2021.. 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()3637And what it looks like when run:3839.. click:run::4041 invoke(hello, ['--count=3'], prog_name='python hello.py', input='John\n')4243It automatically generates nicely formatted help pages:4445.. click:run::4647 invoke(hello, ['--help'], prog_name='python hello.py')4849You can get the library directly from PyPI::5051 pip install click5253Documentation Contents54----------------------5556This part of the documentation guides you through all of the library's57usage patterns.5859.. toctree::60 :maxdepth: 26162 why63 quickstart64 setuptools65 parameters66 options67 arguments68 commands69 prompts70 documentation71 complex72 advanced73 testing74 utils75 bashcomplete76 exceptions77 python3

Documented wincmdArmin Ronacherbefore adoption7e8da4b

line 78why, one step back
78 wincmd

Added some docs on return values from commandsArmin Ronacherbefore adoptione413626

lines 79–96why, one step back
79
80API Reference81-------------8283If you are looking for information on a specific function, class, or84method, this part of the documentation is for you.8586.. toctree::87 :maxdepth: 28889 api9091Miscellaneous Pages92-------------------9394.. toctree::95 :maxdepth: 296

Merge pull request #408 from untitaker/contrib-docsMarkus Unterwaditzerbefore adoption11ca58b

line 97why, one step back
97 contrib

Added some docs on return values from commandsArmin Ronacherbefore adoptione413626

lines 98–100why, one step back
98 changelog
99 upgrading100 license