Skip to main content

Yet another dictionary backed by Redis DB

Project description


Yet another [1] dictionary backed by Redis DB.

We use Redis` 'hash' type [2] and store whole dictionary in one hash.


from persistentdict.dict_in_redis import PersistentDict

db = PersistentDict(hash_name="my-persistent-dict")

# add key to the db with a value
db['key'] = value

# show whole dictionary

# iterate over keys & values in db
for key, value in db.items():

# do sth with key if it is in db
if key in db:

# delete key from db
del db['key']


pip3 install persistentdict

[1] Alternatives: persistent-dict, durabledict

[2] is basically Python's dict, but values can be strings only, so we use json serialization

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 persistentdict, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size persistentdict-1.0.1-py3-none-any.whl (4.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size persistentdict-1.0.1.tar.gz (6.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page