mdl 1.0.4

Data model library to share app state between threads and process and persist the data in the filesystem. Implements a simple way to store structs instances in a LMDB database and other methods like BTreeMap
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python

import lmdb
import sys

path = sys.argv[1]
db = sys.argv[2]

env = lmdb.open(path, max_dbs=200)

db = env.open_db(db.encode())
with env.begin() as txn:
    cursor = txn.cursor(db)
    cursor.first()
    for k, v in cursor:
        print((k, v))