开发者

Custom Shelve Implementation in Python

开发者 https://www.devze.com 2023-02-11 06:12 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号