import re


def parse_line(line: str) -> str:
    """Parse a single line in requirements.txt.

    Note that this function only returns the package that is required, without
    version restrictions
    e.g. "google-cloud-bigquery>1.2.3" => "google-cloud-bigquery".

    Args:
        line: A line in requirements.txt.

    Returns:
        The package requirement contained on the line
        e.g. "google-cloud-bigquery".
    """

    # See
    # https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers
    return re.split(r'[;\[~>=<]', line)[0].strip().lower()