def key_value_pairs(input_dict):
    """
    Coverts a dictionary into a flat list of key-value pairs.
    :param input_dict: e.g. {'name': 'A', 'type': 'B'}
    :return: e.g. [{'key': 'name', 'value': 'A'}, {'key': 'type', 'value': 'B'}]
    """
    output_list = []
    for key, value in input_dict.items():
        output_list.append({'key': key, 'value': value})

    return output_list