parse_dotenv#

scikitplot.mlflow.parse_dotenv(path)[source]#

Parse a minimal .env file containing KEY=VALUE assignments.

Parameters:
pathstr

Path to the .env file.

Returns:
dict[str, str]

Parsed key-value pairs.

Raises:
FileNotFoundError

If the file does not exist.

Parameters:

path (str)

Return type:

dict[str, str]

Notes

Strict behavior: - Empty lines and comments beginning with # are ignored - No shell expansion is performed - Optional leading `export ` is supported - Surrounding matching-pair quotes are stripped from values

("value"value, 'value'value, but "value' is left unchanged — mismatched quotes are not stripped)

  • Invalid lines (missing =) are ignored