import pickle


def readkey(file='key.pickle'):
    """
        Method to read the key to be used for connection.

        Returns
        -------
        dict
            Returns a dictionary object

        """

    # Reading the key
    pickle_in = open(file, "rb")
    key = pickle.load(pickle_in)
    return key