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

Define how to deal with ENV variables #8

Closed
MartinThoma opened this issue Jun 7, 2018 · 1 comment
Closed

Define how to deal with ENV variables #8

MartinThoma opened this issue Jun 7, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@MartinThoma
Copy link
Owner

No description provided.

@MartinThoma MartinThoma added the enhancement New feature or request label Jun 7, 2018
@MartinThoma
Copy link
Owner Author

Maybe something like:

import cfg_load

# Load defaults
cfg = cfg_load.load('some/path.yaml')
env_mapping = cfg_load.load('some/env_mapping.yaml')

where env_mapping.yaml looks like:

- env_name: "AWS_REGION"
  maps_to: ["AWS", "REGION"]
  converter: str
- env_name: "AWS_IS_ENABLED"
  maps_to: ["AWS", "IS_ENABLED"]
  converter: bool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant