pybtree is a package the implements a BTree on-disk.
$ pip3 install pybtreefrom pybtree import BTree
# Open/create a BTree file
btree = BTree('records.btree')
# Insert the key 34 and value 68 associated
btree.insert(34, 68)
# Return 68
btree.search(34)You can find docs, api and examples in here.