Returns a namedtuple from a list of environment variables.
    If not found in shell, gets input with *input* or *getpass*.

def load_env(keys=[], name='NT', use_getpass=False):
    """ Returns a namedtuple from a list of environment variables.
    If not found in shell, gets input with *input* or *getpass*. """
    NT = namedtuple(name, keys)
    if use_getpass:
        values = [os.getenv(x) or getpass.getpass(x) for x in keys]
    else:
        values = [os.getenv(x) or input(x) for x in keys]
    return NT(*values)