• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

pickleshare.egg-info/H03-May-2022-4133

LICENSEH A D08-Apr-20161.1 KiB2217

MANIFEST.inH A D18-Apr-201644 32

PKG-INFOH A D25-Sep-20181.6 KiB4133

README.mdH A D25-Sep-20181 KiB4329

pickleshare.pyH A D25-Sep-20189.7 KiB353264

setup.cfgH A D25-Sep-201867 85

setup.pyH A D08-Apr-20161.9 KiB5947

test_pickleshare.pyH A D08-Apr-20161.5 KiB5544

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