[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#689019: ITP: python-argh -- A simple argparse wrapper

Package: wnpp
Severity: wishlist
Owner: Marco Nenciarini <mnencia@debian.org>

* Package name    : python-argh
  Version         : 0.15.1
  Upstream Author : Andrey Mikhaylenko <andy@neithere.net>
* URL             : http://packages.python.org/argh/
* License         : LGPL-3.0+
  Programming Lang: Python
  Description     : A simple argparse wrapper

Argh provides a very simple wrapper for argparse.

Argparse is a very powerful tool; argh just makes it easy to use.

Here’s a list of 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 command name from function name;
 * infer agrument type from the default value;
 * infer argument action from the default value (for booleans);
 * infer arguments from function signature;
 * 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. You can mix argh-agnostic and
argh-aware code. Just keep in mind that dispatch() does some extra
work that a custom dispatcher may not do.


Note: I'm packaging this as a requirement for barman (http://www.pgbarman.org) package.


Reply to: