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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clize-2.0.tar.gz
(13.4 kB
view details)
File details
Details for the file clize-2.0.tar.gz.
File metadata
- Download URL: clize-2.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
967625e5240f2ba7e8e6091d0a967faa763de27a3ce3765ff61143ede051687b
|
|
| MD5 |
c17321df9f623f6d53e98c22e9744137
|
|
| BLAKE2b-256 |
56bdd72940f300d9dfc425deb26cb59781777dc7a7e2d0689df56eec3874356f
|