def _md5sum(self, datafile): datafile.seek(0) md5 = md5sum(datafile) datafile.seek(0) return md5
def insert_data(self, data): md5 = md5sum(strfile(data)) md5size = '_'.join([md5, str(len(data))]) return self._insert_data(md5size, data)