Fix Python – Parse config files, environment, and command-line arguments, to get a single collection of options
Python’s standard library has modules for configuration file parsing (configparser), environment variable reading (os.environ), and command-line argument parsing (argparse). I want to write a program that does all those, and also:
Has a cascade of option values:
default option values, overridden by
config file options, overridden by
environment ….