Parses the dotenv file, comments (#) are ignored.
    A key must have a '=' to mark it as a key. Strings without a '='
    are ignored.

    :param dotenv_path:
    :return: generator yielding (key,value)

def parse_dotenv(dotenv_path):
    """
    Parses the dotenv file, comments (#) are ignored.
    A key must have a '=' to mark it as a key. Strings without a '='
    are ignored.

    :param dotenv_path:
    :return: generator yielding (key,value)
    """
    with open(dotenv_path) as f:
        for line in f:
            line = line.strip()
            if not line or line.startswith('#') or '=' not in line:
                continue
            k, v = line.split('=', 1)

            # Remove any leading and trailing spaces in key, value
            k, v = k.strip(), v.strip()

            if len(v) > 0:
                quoted = v[0] == v[len(v) - 1] in ['"', "'"]

                if quoted:
                    v = decode_escaped(v[1:-1])

            yield k, v