argparse-extensions

argparse extensions


License
MIT
Install
pip install argparse-extensions==1.0.3

Documentation

argparse-extensions

argparse extensions.

Installation

pip install argparse-extensions

Usage

action=argparse_extensions.NegatableStoreTrueAction is a drop-in replacement for action='store_true':

parser = argparse.ArgumentParser()
parser.add_argument(
    '--foo',
    action=argparse_extensions.NegatableStoreTrueAction)

This will handle --no-foo in addition to --foo.

License

MIT License