# secret_from_env_multi

> **Function** in `langchain_ibm`

📖 [View in docs](https://reference.langchain.com/python/langchain-ibm/utils/secret_from_env_multi)

Return default factory that yields a SecretStr from the first non-empty env var.

The factory:
- Warns if multiple environment variables are set
    (uses the first in `names_priority`).
- Warns if the chosen environment variable is listed in `deprecated`.

## Signature

```python
secret_from_env_multi(
    names_priority: list[str],
    deprecated: set[str] | None = None,
) -> Callable[[], SecretStr | None]
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain-ibm/blob/9c14bbf81d1c7654824b315925778e4fa81426d7/libs/ibm/langchain_ibm/utils.py#L198)