env_prefix

This commit is contained in:
Jörn-Michael Miehe 2023-09-02 15:26:33 +00:00
parent e4296327b0
commit ef6d13a704
2 changed files with 5 additions and 5 deletions

8
.vscode/launch.json vendored
View file

@ -10,10 +10,10 @@
"request": "launch", "request": "launch",
"module": "kiwi_simple_metrics.main", "module": "kiwi_simple_metrics.main",
"env": { "env": {
"METRIC__INTERVAL": "5", "METRICS__INTERVAL": "5",
"METRIC__LOG__ENABLED": "True", "METRICS__LOG__ENABLED": "True",
"METRIC__EXTERNAL__ENABLED": "True", "METRICS__EXTERNAL__ENABLED": "True",
"METRIC__EXTERNAL__EXECUTABLES": "[\"${workspaceFolder}/example/dummy-metric\"]", "METRICS__EXTERNAL__EXECUTABLES": "[\"${workspaceFolder}/example/dummy-metric\"]",
}, },
"justMyCode": true "justMyCode": true
} }

View file

@ -6,7 +6,7 @@ from .metric import MetricSettings
class Settings(BaseSettings): class Settings(BaseSettings):
model_config = SettingsConfigDict( model_config = SettingsConfigDict(
env_prefix="METRIC__", env_prefix="METRICS__",
env_nested_delimiter="__", env_nested_delimiter="__",
) )