Skip to main content

Function decorator to quickly turn functions into CLIs as we know them

Project description

This decorator will turn your normal python functions into proper shell commands.

For example, this code:

from clize import clize, run

@clize
def echo(reverse=False, *text):
    # ...

if __name__ == '__main__':
    run(echo)

will yield the CLI described by this:

Usage: fn [OPTIONS] [text...]

Positional arguments:
  text...

Options:
  --reverse
  -h, --help   Show this help

More features, such as flag aliases, subcommands and python 3 syntax support are described in the README.rst file.

Project details


Release history Release notifications

History Node

4.0.3

History Node

4.0.2

History Node

4.0.1

History Node

4.0

History Node

4.0b1

History Node

4.0a1

History Node

3.1.0

History Node

3.1b1

History Node

3.0.1

History Node

3.0

History Node

3.0b1

History Node

3.0a2

History Node

3.0a1

History Node

2.4

History Node

2.2

History Node

2.1

This version
History Node

2.0

History Node

1.0b

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
clize-2.0.tar.gz (13.4 kB) Copy SHA256 hash SHA256 Source None Oct 7, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page