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

The decorator can take a few parameters all described in the README file.

Project details


Download files

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

Source Distribution

clize-1.0b.tar.gz (8.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page