You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This value is coming from the first line in .env: HELLO=ABC
I don't think the intention of env_prefix is to just fall back to whatever env var it can find that matches the variable without the prefix. If you have nested or complex settings with multiple API keys managed via different env_prefix values, you'll not want to use an API key with the wrong service. I'd consider this API key compromised.
Using my example from #437: https://github.com/hofrob/pydantic-settings-env-prefix
If you
uv run hello
the result is:This value is coming from the first line in
.env
:HELLO=ABC
I don't think the intention of
env_prefix
is to just fall back to whatever env var it can find that matches the variable without the prefix. If you have nested or complex settings with multiple API keys managed via differentenv_prefix
values, you'll not want to use an API key with the wrong service. I'd consider this API key compromised.See also this comment: #437 (comment)
The text was updated successfully, but these errors were encountered: