(self, key, default=None)
Retrieve a single element from the structure.
If the element is not available return the default value.

:parameter key: lookup field
:parameter default: default value when the field is not available
Retrieve a single element from the structure.
If the element is not available return the default value.
Retrieve a single element from the structure . If the element is not available return the default value .
def get(self, key, default=None):
        '''Retrieve a single element from the structure.
If the element is not available return the default value.

:parameter key: lookup field
:parameter default: default value when the field is not available'''
        if self.cache.cache is None:
            dkey = self.pickler.dumps(key)
            backend = self.read_backend
            res = backend.structure(self).get(dkey)
            return backend.execute(
                res, lambda r: self._load_get_data(r, key, default))
        else:
            return self.cache.cache.get(key, default)
def get ( self , key , default = None ) : if self . cache . cache is None : dkey = self . pickler . dumps ( key ) backend = self . read_backend res = backend . structure ( self ) . get ( dkey ) return backend . execute ( res , lambda r : self . _load_get_data ( r , key , default ) ) else : return self . cache . cache . get ( key , default )