import Otama db = Otama.open('test.conf') db.create_table() files = glob('images/*.jpg') + glob('images/*.png') kvs = {} for filename in files: kvs[db.insert(filename)] = filename db.pull() for result in db.search(5, 'lena.jpg'): print("file=%s, sim=%f" % (kvs[result['id']], result['similarity']))