Reputation: 3076
I need to store dynamic (will change every day/hour) value in django app. Value will be generated every day, and I will need access to this key:value from all views in the application. I don't want to store it in some model object instance, it should work like settings.py but I need to store it in database instead. Any ideas?
Upvotes: 2
Views: 2169
Reputation: 497
what about leveldb? https://code.google.com/p/leveldb/
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
there is also python wrap https://code.google.com/p/py-leveldb/
or if you need distributed access checkout http://memcached.org/
Upvotes: 1
Reputation: 55448
Why not use a key-value datastore like Redis? You can use it as a cache backend or as a normal store, it's fast and will persist your data. https://django-redis.readthedocs.org/en/latest/ https://pypi.python.org/pypi/redis/2.10.1
Upvotes: 0