When BAR isn't set, in the shell this would evaluate to "xxzzz". When I use this package I get the following:
from envyaml import EnvYAML
env = EnvYAML()
env["foo"] is None # True
I think the default behaviour should be to perform the expansion like the shell does.
And I propose a flag that can be passed to __init__() to raise errors in case of unset (and empty?) variables that should be parsed. e.g. env = EnvYAML(ignore_unset=False) -> would raise an error (default True of course).
What do you think? I'd be happy to contribute this.
Is the following intended?
When
BAR
isn't set, in the shell this would evaluate to"xxzzz"
. When I use this package I get the following:I think the default behaviour should be to perform the expansion like the shell does.
And I propose a flag that can be passed to
__init__()
to raise errors in case of unset (and empty?) variables that should be parsed. e.g.env = EnvYAML(ignore_unset=False)
-> would raise an error (defaultTrue
of course).What do you think? I'd be happy to contribute this.