<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 29, 2017 at 7:21 AM, Daniel Moisset <span dir="ltr"><<a href="mailto:dmoisset@machinalis.com" target="_blank">dmoisset@machinalis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">As reference of prior art, there is <a href="https://pypi.python.org/pypi/munch" target="_blank">https://pypi.python.org/<wbr>pypi/munch</a> in PyPI</div></blockquote><div><br></div><div>Box is also popular as it permits deeper nesting: <a href="https://pypi.python.org/pypi/python-box/">https://pypi.python.org/pypi/python-box/</a> <a href="https://github.com/cdgriffith/Box">https://github.com/cdgriffith/Box</a>  Addict is similar: <a href="https://pypi.python.org/pypi/addict/2.1.1">https://pypi.python.org/pypi/addict/2.1.1</a> <a href="https://github.com/mewwts/addict">https://github.com/mewwts/addict</a> and I've seen AttrDict a few times in code I maintain: <a href="https://pypi.python.org/pypi/attrdict">https://pypi.python.org/pypi/attrdict</a> <a href="https://github.com/bcj/AttrDict">https://github.com/bcj/AttrDict</a> </div><div><br></div><div>With a cursory search, also found:</div><div>* DotMap: <a href="https://pypi.python.org/pypi/dotmap">https://pypi.python.org/pypi/dotmap</a> <a href="https://github.com/drgrib/dotmap">https://github.com/drgrib/dotmap</a><br></div><div>* EasyDict <a href="https://pypi.python.org/pypi/easydict">https://pypi.python.org/pypi/easydict</a> <a href="https://github.com/makinacorpus/easydict">https://github.com/makinacorpus/easydict</a></div><div>* Treedict (older) <a href="https://pypi.python.org/pypi/treedict">https://pypi.python.org/pypi/treedict</a></div><div>* Bunch (older) <a href="https://pypi.python.org/pypi/bunch">https://pypi.python.org/pypi/bunch</a></div><div><br></div><div>...I spy a theme :P</div><div><br></div><div>Haven't dug into them that much, but I'd try to answer most questions with how they do it. I'm not sure if the recursive 'items as attributes within items as attributes...' feature is a can of worms or if it's something like defaultdict(dict), but with more levels. Getting deeply nested items with dots seems to be the usual use (i.e. complicated JSONs), and I think the degree of laziness in creating/setting nested items is variable.</div><div><br></div><div>Nick</div></div><br></div></div>