a helper method to compile buttons to telegram api format

        :param button_list: list of strings with button values
        :param small_buttons: boolean to resize buttons to fit text size
        :param persist_buttons: boolean to keep buttons around after exiting
        :return: string in json serial format

def _compile_buttons(self, button_list, small_buttons, persist_buttons):

        ''' a helper method to compile buttons to telegram api format

        :param button_list: list of strings with button values
        :param small_buttons: boolean to resize buttons to fit text size
        :param persist_buttons: boolean to keep buttons around after exiting
        :return: string in json serial format
        '''

        import json
        keyboard_list = []
        for item in button_list:
            keyboard_list.append([{'text': item}])
        keyboard_kwargs = {
            'keyboard': keyboard_list,
            'one_time_keyboard': not persist_buttons,
            'resize_keyboard': small_buttons
        }
        json_data = json.dumps(keyboard_kwargs)
        return json_data