from typing import Generator
import pkg_resources


def get_pip_package_list(path: str) -> Generator[pkg_resources.Distribution, None, None]:
    """Get the Pip package list of a Python virtual environment.

    Must be a path like: /project/venv/lib/python3.9/site-packages
    """
    packages = pkg_resources.find_distributions(path)

    return packages