A wrapper around os.environ
to add some features inspired by linuxserver.io docker images.
import betterenv as env
# get an environmental variable
env.get("CONF_FILE")
env.get("CONF_FILE", "default_value")
# gets a list of environmental variables
env.keys()
# get structured keys
env.structured_keys("BETTERENV")
Designed as an override for configparser, if you have the following output
export BETTERENV__section__key=value
{
"section":{
"key":"value"
}
}