Skip to content
Myr

index.rst

This file

Path

docs/index.rst

69 lines · 1.5 KiB

Last changed by

Make documentation invoke click and fix a bunch of issuesArmin Ronacherbefore adoption0a44670

History of this file

Take it

Initial commitArmin Ronacherbefore adoption4101de3

lines 1–17
1click
2=====34click is a Python package for creating beautiful command line interfaces5in a composable way with as little amount of code as necessary. It's the6"Command Line Interface Creation Kit". It's highly configurable but comes7with good defaults out of the box.89It aims at making writing command line tools fun and quick without causing10user frustration at not being able to implement an intended CLI API.1112Click in three points:1314- arbitrary nesting of commands15- automatic help page generation16- supports lazy loading of subcommands at runtime17

Make documentation invoke click and fix a bunch of issuesArmin Ronacherbefore adoption0a44670

lines 18–20why, one step back
18What does it look like? A simple example can be this:
1920.. click:example::

Initial commitArmin Ronacherbefore adoption4101de3

lines 21–56
21
22 import click2324 @click.command()25 @click.option('--count', default=1, help='number of greetings')26 @click.option('--name', prompt='Your name',27 help='the person to greet', required=True)28 def hello(count, name):29 for x in range(count):30 print('Hello %s!' % name)3132 if __name__ == '__main__':33 hello()3435You can get the library directly from PyPI::3637 pip install click3839Documentation Contents40----------------------4142This part of the documentation guides you through all the usage patterns43of the library.4445.. toctree::46 :maxdepth: 24748 why49 quickstart50 parameters51 options52 arguments53 commands54 prompts55 documentation56 setuptools

Added docs for building complex click applicationsArmin Ronacherbefore adoption23d3f68

line 57why, one step back
57 complex

Added an example for aliasesArmin Ronacherbefore adoptione2d388e

line 58why, one step back
58 advanced

Initial commitArmin Ronacherbefore adoption4101de3

lines 59–69
59
60API Reference61-------------6263If you are looking for information on a specific function, class or64method, this part of the documentation is for you.6566.. toctree::67 :maxdepth: 26869 api