skip to navigation
skip to content

Not Logged In

clize 2.0

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

Latest Version: 2.4

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.

 
File Type Py Version Uploaded on Size
clize-2.0.tar.gz (md5) Source 2012-10-07 13KB
  • Downloads (All Versions):
  • 61 downloads in the last day
  • 391 downloads in the last week
  • 1272 downloads in the last month