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

adjust doc to mention nested env variables #92

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions confz/config_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class EnvSource(ConfigSource):
variable names are transformed to lowercase and all dashes are replaced by
underscores. The definitions below are not case-sensitive and can be written with
underscore or dash. An exception is `prefix`, which needs to match exactly.
Dot-notation can be used to access nested configurations."""
Separators can be used to create nested configurations."""

allow_all: bool = False
"""Allow potentially all environment variables to be read as config option."""
Expand All @@ -77,7 +77,9 @@ class EnvSource(ConfigSource):
"""Built in .env file loading with lower than environment precedence. Uses UTF-8
for decoding."""
nested_separator: str = "."
"""Separator will be used in nested environment variables."""
"""Separator which will be used in nested environment variables. Note that
dot-notation is not supported by some shells, so consider using an alternative
like double underscore."""


@dataclass
Expand Down
Loading