-
Notifications
You must be signed in to change notification settings - Fork 10
conf JSON filestore
malvira edited this page Apr 6, 2013
·
4 revisions
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: