easydict

Access dict values as attributes (works recursively)
Download

easydict Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Publisher Name:
  • Mathieu Leplatre
  • Publisher web site:
  • http://mathieu-leplatre.info

easydict Tags


easydict Description

Access dict values as attributes (works recursively) easydict is a Python module to access dict values as attributes (works recursively).Usage:>>> from easydict import EasyDict>>> d = EasyDict({'foo':3, 'bar':{'x':1, 'y':2}})>>> d.foo3>>> d.bar.x1Very useful when exploiting parsed JSON content !>>> from easydict import EasyDict>>> from simplejson import loads>>> j = """{"Buffer": 12,"List1": }, {"type" : "point", "coordinates" : }, {"type" : "point", "coordinates" : }, {"type" : "point", "coordinates" : }]}""">>> d = EasyDict(loads(j))>>> d.Buffer12>>> d.List1.coordinates54.9 Requirements: · Python


easydict Related Software