Get a value from a dictionary or an environment variable.
The key to look up in the dictionary.
The environment variable to look up if the key is not in the dictionary.
The default value to return if the key is not in the dictionary or the environment.