In case anyone is looking for mature alternatives that are used in production
https://github.com/cdgriffith/Box/wiki/Types-of-Boxes#defaul...
from box import Box
movie_box = Box({ "Robin Hood: Men in Tights": { "imdb stars": 6.7, "length": 104 } })
movie_box.Robin_Hood_Men_in_Tights.imdb_stars
from munch import Munch
b = Munch()
b.hello = 'world'
b.foo = Munch(lol=True)
b.foo.lol b.foo.lol = True >>> from box import Box
>>> empty_box = Box(default_box=True)
>>> empty_box.a.b.c.d.e.f.g # <Box: {}>