Skip to main content

redisdol

redis with a simple (dict-like or list-like) interface

To install: pip install redisdol

Provides a collections.abc.MutableMapping (i.e. dict-like) interface to Redis.

Note that Redis automatically converts everything to bytes when writing, which means that read and write are not inverse of each other in the base RedisPersister. A serialization/deserialization layer can be added to make read and write consistent.

>>> from redisdol import RedisBytesPersister
>>> s = RedisBytesPersister()  # plenty of params possible (all those of redis.Redis), but taking defaults.
>>>
>>> # clear the kehys we'll be using
>>> keys = ['_pyst_test_str', '_pyst_test_int', '_pyst_test_float']
>>> for k in keys:
...     del s[k]
>>>
>>> before_length = len(s)
>>>
>>> s['_pyst_test_str'] = 'hello'
>>> s['_pyst_test_str']  # note you won't be getting a str but bytes
b'hello'
>>>
>>> '_pyst_test_str' in s
>>>
>>> # numbers are converted to strings then bytes
>>> s['_pyst_test_int'] = 42
>>> assert s['_pyst_test_int'] == b'42'
>>> s['_pyst_test_float'] = 3.14
>>> assert s['_pyst_test_float'] == b'3.14'
>>>
>>> assert len(s) == before_length + 3
>>>
>>> '_pyst_test_float' in
>>>
>>> # clean up
>>> for k in keys:
...     del s[k]
>>>

Metadata

Release files for redisdol 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redisdol 0.0.7
File Size Uploaded
redisdol-0.0.7.tar.gz 34.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for redisdol 0.0.7
File Interpreter ABI Platform
redisdol-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 47.2 kB

Release files / redisdol-0.0.7.tar.gz

Download URL redisdol-0.0.7.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b3ea9e969357dddb7df43e6fe134b4b5fbf94c2ef852e96991de50f2f768e44f
BLAKE2b-256 checksum
How to use checksums
342afca3742ea2fc2e32eea4d30a2ac53dc359555013b3f679303c6cc6bf6126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / redisdol-0.0.7-py3-none-any.whl

Download URL redisdol-0.0.7-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b607012cd0df8b539de567056fd24ed2fa9fcfe554796f69fd09471fb1a97505
BLAKE2b-256 checksum
How to use checksums
7ef7f95e3519e422f186c90f566b17610cc01c9949f1a509aaa8fb31ae3c88a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.0.9

2 release files

0.0.8

2 release files

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page