import json


def connection(filename):
    """Get the api-key and database id from the configuration file.

    filename : path to the json config file.
    Return an AirTable connection object.

    The configuration file is as follow (json):
            {
            "apikey":"MY--KEY",
            "baseid":"MY--BASE--ID"
            }
    """
    airtableconnect = json.load(open(filename))

    return airtableconnect