Allow env_nested config with __

allow to define nested config using Setting param https://docs.pydantic.dev/latest/concepts/pydantic_settings/#parsing-environment-variable-values
This commit is contained in:
eMerzh 2025-07-01 22:41:46 +02:00 committed by GitHub
commit debb3b9a1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -434,7 +434,7 @@ class AppSettings(AppLoggingSettings):
def WORKERS(self) -> int:
return max(1, self.WORKER_PER_CORE * self.UVICORN_WORKERS)
model_config = SettingsConfigDict(arbitrary_types_allowed=True, extra="allow")
model_config = SettingsConfigDict(arbitrary_types_allowed=True, extra="allow", env_nested_delimiter='__')
# ===============================================
# TLS