I have a script which has certain options that can either be passed on the command line, or from environment variables. The CLI should take precedence if both are present, a
ConfigArgParse adds support for environment variables to argparse, so you can do things like:
p = configargparse.ArgParser() p.add('-m', '--moo', help='Path of cow', env_var='MOO_PATH') options = p.parse_args()