Documentation has a paradigm where the only section is called settings This seems to be the default namespace for python-decouple thus if you have:
[settings]
DEBUG=True
you can parse the config with:
from decouple import config
DEBUG = config('DEBUG', default=False, cast=bool) # no section argument
But what if we have custom sections like:
[sectionA]
DEBUG=True
[sectionB]
foo="bar"
?
I know that one can easily use ConfigParser to parse custom sections, like so:
config_parser.get('sectionA', 'DEBUG') # the corresponding call in ConfigParser
but I was wondering how it's done through python-decouple since it also supports .ini files