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.6

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.6
File Size Uploaded
redisdol-0.0.6.tar.gz 32.9 kB Details

Built distribution (wheel)

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

Total release size: 44.5 kB

Release files / redisdol-0.0.6.tar.gz

Download URL redisdol-0.0.6.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a775b11d63121600e052e9235e8dff74173cd958b5d5b69f7d7c4bcd5f9fbbe9
BLAKE2b-256 checksum
How to use checksums
9238c574abb9c5638c66c6d50aea6e2957957b426f825a033951f54cd56af692
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.6-py3-none-any.whl

Download URL redisdol-0.0.6-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7812fe8e577807d45b57d7bde92f13a18e371c36418ec86e7eec86926c1324ee
BLAKE2b-256 checksum
How to use checksums
808bdcd5e450196cb2234c4f2f2d5cbe747e8fd8d49b05b365ca7828c1c50a2a
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

0.0.7

2 release files

This release

0.0.6 This release

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