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.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
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']
Installation:
pip3 install persistentdict
[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
Metadata
Release files for persistentdict 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| persistentdict-1.0.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| persistentdict-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / persistentdict-1.0.1.tar.gz
| Download URL | persistentdict-1.0.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4077de2489a28a7757cb8afa32341811bbd7947249ea2cd0b0cf6c0bafc705ed
|
|
BLAKE2b-256 checksum How to use checksums |
4f190a4e80f0c00cb5b83111939daa3b25e4ab7068ecb7f761ec5020b8d0bac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
|
Release files / persistentdict-1.0.1-py3-none-any.whl
| Download URL | persistentdict-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e768ddd195ac9b9fb8fb0b6a3ebca477e13a8168d6a6cb03f5d381bc7a7c681c
|
|
BLAKE2b-256 checksum How to use checksums |
2ab6c3c6f9927482652d4896e6fe71499f49458bd75f180d7f6e31db5b6420c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3
|