Custom Shelve Implementation in Python
I am very new to Python.A have a requirement to use a custom Shelve implementation where it can be backed by MySQL in stead of FileSystem. The requirement looks a bit odd as you may think if I need a DB store why not to use some driver adhering to Py DB api. The real problem goes like this. There is already a shelve implementation in a open sourced project which uses the FileSystem to persist t开发者_开发百科he data. Now suppose I need to provide a way where it can use either FileBased or MySQL based store and without changing the already made calls and the calls which may be added in future, I need to find a way out where the dict in Shelve can be backed by MySQL.
Will there be a way out? Thanks for your time and help in advance.
This is probably far too late to help you, but I just discovered Shove.
Common object storage frontend that supports dictionary-style access, object serialization and compression, and multiple storage and caching backends.
精彩评论