Skip to content

Conversation

@mike24zl
Copy link

@mike24zl mike24zl commented Jul 12, 2020

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

Copy link

@aryahezarkhani aryahezarkhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a couple of simple tests to safeguard against breaking changes
https://github.com/bcwaldon/warlock/blob/master/tests/test_core.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for nested schemata

2 participants