conf JSON filestore - malvira/bramble GitHub Wiki
The configuration and persistent datastore is a simple JSON document store in /var/cache/bradmin/db
.
It is implemented in fileStore.py
A db
object is created in init.py and initialized to the location of the filestore:
db = fileStore(app.config['CACHE_ROOT'] + '/db')
Documents are stored with the store
method:
db.store('conf/bradmin', json.dumps(conf, sort_keys=True, indent=4))
To load an object:
lowpanConf = json.loads(db.get('conf/lowpan'))
The following config files can exist: