A simple package which converts a standard python dictionary to a dot accessible configuration object.
pip install dotconfrom dotcon import DotConfig
mydict = {
"A": [1, 2, 3, 4],
"B": {"C": 5},
"D": "E",
"F": None,
}
ddict = DotConfig(mydict)
ddict.A
>>> [1, 2, 3, 4]
# Or the regular way
ddict['A']
>>> [1, 2, 3, 4]
ddict.B
>>> {"C": 5}
ddict.B.C
>>> 5
ddict.D
>>> "E"
ddict.F
>>> None