辞書型データ構造を持ち、高速ランダムアクセス可能なデータベースの python バインディング
documentation

データベースを開く

import lmdb
MAP_SIZE = int(25e9)  # 25GB
env = lmdb.open(str(cache_path), map_size=MAP_SIZE)
# 書き込みを行わないときは
env = lmdb.open(str(cache_path), map_size=MAP_SIZE, readonly=True, lock=False)

開いたデータベースを使う

# データ数を見る
with env.begin() as txn:
    stats = txn.stat()
 
# 格納
with env.begin(write=True) as txn:
	txn.put(b'key', pickle.dumps({'data'='data'}))
 
# 取り出す
value=env.begin().get(b"key")
# または
with env.begin() as txn:
	value=txn.get(b"key")

データベースのキーにはバイト列しか使えないので、uint を使いたい場合は以下のようにすると良い:

a=32
txn.get(a.to_bytes(4, "big", signed=False))