corvix.env¶
Environment variable helpers, including Docker secret file support.
Functions¶
|
Return env var value, supporting ${NAME}_FILE secret file fallbacks. |
Module Contents¶
- corvix.env.get_env_value(name: str) str | None[source][source]¶
Return env var value, supporting ${NAME}_FILE secret file fallbacks.
Resolution order: 1) ${NAME} if set and non-empty 2) file contents from ${NAME}_FILE if set and non-empty 3) None when neither is provided
- Raises:
ValueError: if both ${NAME} and ${NAME}_FILE are set, or if the file path is unreadable.