def exists(self, record_key):
        
        ''' 
            a method to determine if a record exists in collection

        :param record_key: string with key of record
        :return: boolean indicating file existence
        '''
        
        title = '%s.exists' % self.__class__.__name__
    
    # validate inputs
        input_fields = {
            'record_key': record_key
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
    
    # construct request kwargs
        list_kwargs = {
            'spaces': self.drive_space,
            'fields': 'files(id)'
        }
    
    # retrieve file id
        file_id, parent_id = self._get_id(record_key)
        if file_id:
            return True
        return False
def exists ( self , record_key ) : title = '%s.exists' % self . __class__ . __name__ input_fields = { 'record_key' : record_key } for key , value in input_fields . items ( ) : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) list_kwargs = { 'spaces' : self . drive_space , 'fields' : 'files(id)' } file_id , parent_id = self . _get_id ( record_key ) if file_id : return True return False
a method to determine if a record exists in collection

        :param record_key: string with key of record
        :return: boolean indicating file existence