labpack/databases/couchbase.py
def delete_sessions(self, uid):
        
        '''
            a method to delete all session tokens associated with a user
            
        :param uid: string with id of user in bucket
        :return: integer with status code of delete operation
        '''
    
        title = '%s.delete_session' % self.__class__.__name__
        
    # validate inputs
        input_fields = {
            'uid': uid
        }
        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 url
        url = self.bucket_url + '/_user/%s/_session' % uid
    
    # send request
        response = requests.delete(url)

        return response.status_code

            a method to delete all session tokens associated with a user
            
        :param uid: string with id of user in bucket
        :return: integer with status code of delete operation
        
a method to delete all session tokens associated with a user
a method to delete all session tokens associated with a user
def delete_sessions(self, uid):
        title = '%s.delete_session' % self.__class__.__name__
        input_fields = {
            'uid': uid
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)
        url = self.bucket_url + '/_user/%s/_session' % uid
        response = requests.delete(url)
        return response.status_code
def delete_sessions ( self , uid ) : title = '%s.delete_session' % self . __class__ . __name__ input_fields = { 'uid' : uid } for key , value in input_fields . items ( ) : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) url = self . bucket_url + '/_user/%s/_session' % uid response = requests . delete ( url ) return response . status_code
a method to delete all session tokens associated with a user
a method to delete all session tokens associated with a user
'''
            a method to delete all session tokens associated with a user
            
        :param uid: string with id of user in bucket
        :return: integer with status code of delete operation
        ''' # validate inputs # construct url # send request
integer with status code of delete operation
integer with status code of delete operation
self
uid
string with id of user in bucket
string with id of user in bucket