NickName:Tianyang Li Ask DateTime:2011-03-04T10:52:25 Is shelve in Python thread safe? Is shelve in Python used for data persistence thread safe? If not, what's a good alternative? Copyright Notice:Content Author:「Tianyang Li」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/5189137/is-shelve-in-python-thread-safe Answers Mahmoud Abdelkader 2011-03-04T08:29:42 From the standard library documentation about the Shelve module, under the heading Restrictions:\n\n\n The shelve module does not support\n concurrent read/write access to\n shelved objects. (Multiple\n simultaneous read accesses are safe.)\n\n\nI would assume that it's probably implementation dependent and in which case, in order to be sure, I would conclude that it certainly is not thread safe.", Andreas Jung 2011-03-04T03:04:58 Alternatives: ZODB\n\nhttp://www.zodb.org/",