Yet another dictionary backed by Redis DB
Project description
persistentdict
Yet another [1] dictionary backed by Redis DB.
We use Redis` 'hash' type [2] and store whole dictionary in one hash.
Usage:
from persistentdict import PersistentDict
db = PersistentDict(hash_name="my-persistent-dict")
# add key to the db with a value
db[key] = value
# show whole dictionary
print(db)
# iterate over keys & values in db
for key, value in db.items():
do_something(key)
# do sth with key if it is in db
if key in db:
do_something(key)
# delete key from db
del db[key]
[1] Alternatives: persistent-dict, durabledict
[2] https://redis.io/topics/data-types-intro#hashes is basically Python's dict, but values can be strings only, so we use json serialization
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
persistentdict-0.1.0.tar.gz
(5.2 kB
view details)
Built Distribution
File details
Details for the file persistentdict-0.1.0.tar.gz
.
File metadata
- Download URL: persistentdict-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d7ff914be82b4677751d479dd483398dc532f1063f6467bbed21898e7503c66 |
|
MD5 | a31f098ea42cb391fb4f4eca2a2428cb |
|
BLAKE2b-256 | 881bc875059ce68324cbe56fcd2a6922ff6673396da89712e2614e416f9855ee |
File details
Details for the file persistentdict-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: persistentdict-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 702aa0808aabad1ad2796de9c3ef8555d488da51b6bdc390017e041643a12c1d |
|
MD5 | 840d5f9e69e0f2a80d1dd685e578ca3d |
|
BLAKE2b-256 | d75b124265e15856aa809c59d2e7bb548236fd2da811b8c31d401a37f55f6288 |