from typing import Dict


def _read_requirements_file(f) -> Dict:
    """Read requirement.txt file

    :param f: req file object
    :return: dict representing pip requirements
    """
    requirements = {}
    for line in f.readlines():
        line = line.decode()
        requirements[line.split('=')[0]] = line.replace("\n", "")
    return requirements