labpack/databases/couchbase.py
def delete_user(self, uid, delete_views=True):
        
        '''
            a method to retrieve the account details of a user in the bucket
            
        :param uid: string with id of user in bucket
        :param delete_views: boolean to remove indices attached to user
        :return: integer with status of delete operation
        '''
    
        title = '%s.delete_user' % self.__class__.__name__
        
    # validate inputs
        input_fields = {
            'uid': uid
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)
    
    # delete any existing sessions
        self.delete_sessions(uid)
    
    # delete any existing views
        if delete_views:
            self.delete_view(uid=uid)
            
    # construct url
        url = self.bucket_url + '/_user/%s' % uid

    # send request
        response = requests.delete(url)
    
    # report outcome
        self.printer('User "%s" removed from bucket "%s"' % (uid, self.bucket_name))
        
        return response.status_code

            a method to retrieve the account details of a user in the bucket
            
        :param uid: string with id of user in bucket
        :param delete_views: boolean to remove indices attached to user
        :return: integer with status of delete operation
        
a method to retrieve the account details of a user in the bucket
a method to retrieve the account details of a user in the bucket
def delete_user(self, uid, delete_views=True):
        title = '%s.delete_user' % self.__class__.__name__
        input_fields = {
            'uid': uid
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)
        self.delete_sessions(uid)
        if delete_views:
            self.delete_view(uid=uid)
        url = self.bucket_url + '/_user/%s' % uid
        response = requests.delete(url)
        self.printer('User "%s" removed from bucket "%s"' % (uid, self.bucket_name))
        return response.status_code
def delete_user ( self , uid , delete_views = True ) : title = '%s.delete_user' % self . __class__ . __name__ input_fields = { 'uid' : uid } for key , value in input_fields . items ( ) : if value : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) self . delete_sessions ( uid ) if delete_views : self . delete_view ( uid = uid ) url = self . bucket_url + '/_user/%s' % uid response = requests . delete ( url ) self . printer ( 'User "%s" removed from bucket "%s"' % ( uid , self . bucket_name ) ) return response . status_code
a method to retrieve the account details of a user in the bucket
a method to retrieve the account details of a user in the bucket
'''
            a method to retrieve the account details of a user in the bucket
            
        :param uid: string with id of user in bucket
        :param delete_views: boolean to remove indices attached to user
        :return: integer with status of delete operation
        ''' # validate inputs # delete any existing sessions # delete any existing views # construct url # send request # report outcome
integer with status of delete operation
integer with status of delete operation
self
uid
string with id of user in bucket
string with id of user in bucket
delete_views
boolean to remove indices attached to user
boolean to remove indices attached to user