3 ms·
Me too. There is a library that solves this: https://github.com/Infinidat/munch https://github.com/Infinidat/munch from munch import Munch foo = {'a':
by Rotareti 8y ago
Me too. There is a library that solves this: https://github.com/Infinidat/munch https://github.com/Infinidat/munch
from munch import Munch
foo = {'a':1, 'b':2}
foo = Munch(foo)
print(foo.a) # 1
print(foo['a']) # 1