Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support nested config structures too #4

Merged
merged 1 commit into from Feb 3, 2018
Merged

Support nested config structures too #4

merged 1 commit into from Feb 3, 2018

Conversation

cknv
Copy link
Owner

@cknv cknv commented Feb 2, 2018

Sometimes you need dictionaries to configure things. I have encountered this most often with 3rd party tools that you integrate into an app.

This will make envargs able to support nesting vars gracefully such as:

settings = {
    'nested': {
        'MY_VAR': Var(use=str),
    },
}

And envargs will recurse properly to take care of the nested Vars.

I suppose this also makes it trivial to add static config vars later on, but that is beyond this PR.

@coveralls
Copy link

coveralls commented Feb 2, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 51e4f12 on nesting into 26df9cc on master.

@cknv cknv merged commit f07a7bc into master Feb 3, 2018
@cknv cknv deleted the nesting branch February 3, 2018 08:40
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.

None yet

2 participants