def clear_key_before(self, key, namespace=None, timestamp=None):
        """Clear all data before `timestamp` for a given key. Note that the
        timestamp is rounded down to the nearest block boundary"""
        block_size = self.config.block_size
        if namespace is None:
            namespace = self.config.namespace
        if timestamp is not None:
            offset, remainder = divmod(timestamp, block_size)
            if remainder:
                raise ValueError('timestamp must be on a block boundary')
            if offset == 0:
                raise ValueError('cannot delete before offset zero')
            offset -= 1
            self.driver.clear_key_before(key, namespace, offset, timestamp)
        else:
            self.driver.clear_key_before(key, namespace)
def clear_key_before ( self , key , namespace = None , timestamp = None ) : block_size = self . config . block_size if namespace is None : namespace = self . config . namespace if timestamp is not None : offset , remainder = divmod ( timestamp , block_size ) if remainder : raise ValueError ( 'timestamp must be on a block boundary' ) if offset == 0 : raise ValueError ( 'cannot delete before offset zero' ) offset -= 1 self . driver . clear_key_before ( key , namespace , offset , timestamp ) else : self . driver . clear_key_before ( key , namespace )
Clear all data before `timestamp` for a given key. Note that the
        timestamp is rounded down to the nearest block boundary