warlock icon indicating copy to clipboard operation
warlock copied to clipboard

Add capability to get nested items using dot

Open mike24zl opened this issue 4 years ago • 0 comments

Added a convenience capability to read with dot notation for nested dicts and lists in model.
Example:

>>> d = {'level1':{'level2':[{'leve3':'a'},{'level3':'b'}]}}
>>> f = warlock.model_factory({})  
>>> m = f(d)
>>> m.level1.level2[0].level3
'a'

Fixes #50

mike24zl avatar Jul 12 '20 15:07 mike24zl