An argparse wrapper
This Python module provides a wrapper for argparse with support for hierarchical
commands that can be bound to modules or classes.
Features that argh adds to argparse:
* mark a function as a CLI command and specify its arguments before the parser
is instantiated;
* nested commands made easy: no messing with subparsers (though they are of
course used under the hood);
* infer agrument type from the default value;
* infer command name from function name;
* add an alias root command help for the --help argument;
* enable passing unwrapped arguments to certain functions instead of a
argparse.Namespace object.
Argh is fully compatible with argparse. argh-agnostic and argh-aware code
can be mixed. Keep in mind that argh.dispatch does some extra
work that a custom dispatcher may not do.
- Links to devel:languages:python / python-argh
- Has a link diff
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout server:database:postgresql/python-argh && cd $_
- Create Badge
Source Files (show unmerged sources)
Filename | Size | Changed |
---|---|---|
argh-0.31.2.tar.gz | 0000057200 55.9 KB | |
python-argh.changes | 0000011345 11.1 KB | |
python-argh.spec | 0000002470 2.41 KB |
Comments 0