import configparser


def read_aranet_conf(file):
    """Reads the Aranet Cloud configuration file

    Args:
        file (str or os.PathLike): A path-like object giving the pathname of
            the configuration file.

    Returns:
        [configparser.ConfigParser]: A ConfigParser object with the
            configuration.
    """
    aranet_conf = configparser.ConfigParser(
        defaults={
            "endpoint": "https://aranet.cloud/api"
        }
    )

    with open(file) as f:
        aranet_conf.read_file(f)
    return aranet_conf