labpack/databases/couchbase.py
def load_user(self, uid):
    
        '''
            a method to retrieve the account details of a user in the bucket
            
        :param uid: string with id of user in bucket 
        :return: dictionary with account fields for user
        '''
    
        title = '%s.load_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)
    
    # construct url
        url = self.bucket_url + '/_user/%s' % uid
        
    # send request and unwrap response
        response = requests.get(url)
        response = response.json()
    
        return response

            a method to retrieve the account details of a user in the bucket
            
        :param uid: string with id of user in bucket 
        :return: dictionary with account fields for user
        
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 load_user(self, uid):
        title = '%s.load_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)
        url = self.bucket_url + '/_user/%s' % uid
        response = requests.get(url)
        response = response.json()
        return response
def load_user ( self , uid ) : title = '%s.load_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 ) url = self . bucket_url + '/_user/%s' % uid response = requests . get ( url ) response = response . json ( ) return response
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 
        :return: dictionary with account fields for user
        ''' # validate inputs # construct url # send request and unwrap response
dictionary with account fields for user
dictionary with account fields for user
self
uid
string with id of user in bucket
string with id of user in bucket