README.md
1PickleShare - a small 'shelve' like datastore with concurrency support
2
3Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike shelve,
4many processes can access the database simultaneously. Changing a value in
5database is immediately visible to other processes accessing the same database.
6
7Concurrency is possible because the values are stored in separate files. Hence
8the "database" is a directory where *all* files are governed by PickleShare.
9
10Both python2 and python3 are supported.
11
12Example usage:
13
14```python
15
16from pickleshare import *
17db = PickleShareDB('~/testpickleshare')
18db.clear()
19print("Should be empty:", db.items())
20db['hello'] = 15
21db['aku ankka'] = [1,2,313]
22db['paths/are/ok/key'] = [1,(5,46)]
23print(db.keys())
24```
25
26This module is certainly not ZODB, but can be used for low-load
27(non-mission-critical) situations where tiny code size trumps the
28advanced features of a "real" object database.
29
30Installation guide:
31
32```sh
33pip install pickleshare
34```
35
36Or, if installing from source
37
38```sh
39pip install .
40```
41
42
43