import json


def get_creds(inrix_creds_fp):
    """Read and return INRIX credential information from JSON file.
    
    JSON should contain {"email": "<YOUR EMAIL>", "password": "<YOUR PASSWORD"}
    """
    with open(inrix_creds_fp, "r") as f:
        inrix_creds = json.load(f)

    if ("email" not in inrix_creds.keys()) or ("password" not in inrix_creds.keys()):
        msg = (
            f'Cannot read JSON "{inrix_creds_fp}". ' 
            f'JSON should contain {{"email": "<YOUR EMAIL>", "password": "<YOUR PASSWORD"}}'
        )
        raise ValueError(msg)

    return inrix_creds