from typing import Dict


def load_env_file(filename: str) -> Dict[str, str]:
    """Load environmental variables from a `.env` file."""
    result = {}
    with open(filename) as f:
        for line in f.readlines():
            if line.startswith('#') or not line.strip():
                # Skip this line. It's a comment or just whitespace.
                continue
            # Remove the end of line character
            line = line.rstrip()
            # Split the line into key and value
            key, value = line.split('=', 1)
            # Add the variable to the result
            result[key] = value
    return result