Skip to content
Myr

Updating README to match flask style.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Also added `long_description` to setup.py for PyPI happiness.

authored by Doug Harris · committed by Doug Harris · parent 4cc1b9e · Browse files · 3 files+100 added−68 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+100 added−68 removed

  • other:+100 added−68 removed

3 files+100 added−68 removed

deleted:README.md-64 removed
added:README.rst+92 added
1\$ click\_2==========34What's Click?5-------------67Click is a Python package for creating beautiful command line interfaces8in a composable way with as little code as necessary. It's the "Command9Line Interface Creation Kit". It's highly configurable but comes with10sensible defaults out of the box.1112It aims to make the process of writing command line tools quick and fun13while also preventing any frustration caused by the inability to implement14an intended CLI API.1516Click in three points:17 - arbitrary nesting of commands18 - automatic help page generation19 - supports lazy loading of subcommands at runtime202122Installing23----------2425Install and update using `pip`_:2627.. code-block:: text2829 $ pip install click3031A Simple Example32----------------3334What does it look like? Here is an example of a simple Click program:3536.. code-block:: python3738 import click39 40 @click.command()41 @click.option('--count', default=1, help='Number of greetings.')42 @click.option('--name', prompt='Your name',43 help='The person to greet.')44 def hello(count, name):45 """Simple program that greets NAME for a total of COUNT times."""46 for x in range(count):47 click.echo('Hello %s!' % name)48 49 if __name__ == '__main__':50 hello()5152And what it looks like when run:5354.. code-block:: text5556 $ python hello.py --count=357 Your name: John58 Hello John!59 Hello John!60 Hello John!6162Donate63------6465The Pallets organization develops and supports Flask and the libraries66it uses. In order to grow the community of contributors and users, and67allow the maintainers to devote more time to the projects, `please68donate today`_.6970.. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20717273Links74-----7576* Website: https://www.palletsprojects.com/p/click/77* Documentation: http://click.pocoo.org/78* License: `BSD <https://github.com/pallets/click/blob/master/LICENSE>`_79* Releases: https://pypi.org/project/click/80* Code: https://github.com/pallets/click81* Issue tracker: https://github.com/pallets/click/issues82* Test status:8384 * Linux, Mac: https://travis-ci.org/pallets/click85 * Windows: https://ci.appveyor.com/project/pallets/click8687* Test coverage: https://codecov.io/gh/pallets/click8889.. _WSGI: https://wsgi.readthedocs.io90.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/91.. _Jinja: https://www.palletsprojects.com/p/jinja/92.. _pip: https://pip.pypa.io/en/stable/quickstart/
modified:setup.py+8 added-4 removed
1#!/usr/bin/env python2# -*- coding: utf-8 -*-3import io4import re2import ast5from setuptools import setup678_version_re = re.compile(r'__version__\s+=\s+(.*)')9109with open('click/__init__.py', 'rb') as f:10 version = str(ast.literal_eval(_version_re.search(11 f.read().decode('utf-8')).group(1)))11with io.open('README.rst', 'rt', encoding='utf8') as f:12 readme = f.read()1314with io.open('click/__init__.py', 'rt', encoding='utf8') as f:15 version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)1617setup(18 name='click',19 version=version,
1 unmodified line
21 author='Armin Ronacher',22 author_email='armin.ronacher@active-4.com',23 maintainer='Pallets team',24 maintainer_email='contact@palletsprojects.com',25 long_description=readme,26 packages=['click'],27 description='A simple wrapper around optparse for '28 'powerful command line utilities.',29 license='BSD',
14 unmodified lines