mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-20 05:37:56 +00:00
81830c2d74
Co-authored-by: xss <michaela@michaela.lgbt> |
||
---|---|---|
.. | ||
__init__.py | ||
__main__.py | ||
README.md |
Helper class for getting config and secrets within SondeHub
Example
import config_handler
mqtt_password = config_handler.get("MQTT", "PASSWORD")
Logic
- Checks environment variable for "{TOPIC}_{PARAMETER}" if it exists return that value
- If that doesn't exist then we perform a
SecretsManager.Client.get_secret_value(SecretId={TOPIC})
- We then
json.loads()
this value and return the respective value.