Package Info

python-argh


An argparse wrapper


Development/Languages/Python

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.


License: LGPL-3.0-or-later
URL: https://github.com/neithere/argh/

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.26.1-bp150.2.3 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-argh
  • python3-argh
0.26.1-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-argh
  • python3-argh
0.26.1-bp151.3.3 info GA Release 2019-07-17 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-argh
  • python3-argh
0.26.2-bp152.1.8 info GA Release 2020-04-17 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-argh
  • python3-argh
0.26.2-bp153.1.18 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python2-argh
  • python3-argh