(*args, **kwargs)
return _add_argument(
        *args, action=DefaultFromEnv, env_prefix='STOLOS_', **kwargs)
Wraps argparse.ArgumentParser.add_argument to guarantee that all
    defined options are available from environment variables prefixed by
    "STOLOS_"

    add_argument('--booloption', action='store_true')
Wraps argparse.ArgumentParser.add_argument to guarantee that all
    defined options are available from environment variables prefixed by
    "STOLOS_"
Wraps argparse . ArgumentParser . add_argument to guarantee that all defined options are available from environment variables prefixed by STOLOS_
def add_argument(*args, **kwargs):
    """Wraps argparse.ArgumentParser.add_argument to guarantee that all
    defined options are available from environment variables prefixed by
    "STOLOS_"

    add_argument('--booloption', action='store_true')
    """
    if 'action' in kwargs:
        val = kwargs.pop('action')
        if val == 'store_true':
            kwargs['const'] = True
            kwargs['nargs'] = '?'
        else:
            raise NotImplemented(
                "Not sure how to deal with this argparse argument option"
                "  Stolos applies a custom action to get defaults from"
                " the environment.  You cannot specify action=%s for the"
                " argument identified by: %s" % (val, str(args[:2])))
    return _add_argument(
        *args, action=DefaultFromEnv, env_prefix='STOLOS_', **kwargs)
def add_argument ( * args , * * kwargs ) : if 'action' in kwargs : val = kwargs . pop ( 'action' ) if val == 'store_true' : kwargs [ 'const' ] = True kwargs [ 'nargs' ] = '?' else : raise NotImplemented ( "Not sure how to deal with this argparse argument option" "  Stolos applies a custom action to get defaults from" " the environment.  You cannot specify action=%s for the" " argument identified by: %s" % ( val , str ( args [ : 2 ] ) ) ) return _add_argument ( * args , action = DefaultFromEnv , env_prefix = 'STOLOS_' , * * kwargs )