Skip to main content

pdict has a dictionary like interface and a sqlite backend

Project description

pdict has a dictionary like interface and a sqlite backend. It uses pickle to store Python objects and strings, which are then compressed with zlib for storage in sqlite. Multithreaded interaction is supported.

Depends on python 2.5+

Example use:

>>> filename = 'cache.db'
>>> cache = pdict.PersistentDict(filename)
>>> url = ''
>>> html = '<html>abc</html>'
>>> url in cache
>>> cache[url] = html
>>> url in cache
>>> cache[url] == html
>>> cache.get(url)['value'] == html
>>> now =
>>> cache.meta(url)
>>> cache.meta(url, 'meta')
>>> cache.meta(url)
>>> del cache[url]
>>> url in cache

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pdict, version 1.4.1
Filename, size File type Python version Upload date Hashes
Filename, size pdict-1.4.1.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page