Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: RedisDict
3 points by Attummm 33 days ago | hide | past | favorite | 2 comments
RedisDict is a Python dictionary with a Redis backend, designed for handling large datasets. It simplifies Redis operations especially for large-scale and distributed systems, and has been running in production since 2017, originally built in Python 2.

The library focuses on get and set operations in Redis, ensuring that each key-value pair operates independently, so changes to one entry do not affect others.

Optimized for performance with large datasets, RedisDict maintains high speed even at scale.

Data types are managed without using Pickle to avoid security risks associated with untrusted, serialized data.

Key features include namespacing, pipelining, expiration, and support for multiple data types. RedisDict provides a full dictionary interface and has extensive test coverage.

GitHub: https://github.com/Attumm/redis-dict

Documentation: https://attumm.github.io/redis-dict/




How does it compare with pottery? https://pypi.org/project/pottery/


RedisDict is built exclusively as a dictionary, without focusing on other collections.

This means that all features are available as they build on top of each other. RedisDict has namespacing by default, allowing users to avoid unintentional collisions in production, which are really difficult to debug. Learned that lesson the hard way.

RedisDict also has more support for different types, relying not just on json encoding/decoding but passing those to json so even nested types such as list, dictionaries there type support.

Let's say you would like to build a cache to store webpages for 60 minutes.

```

cache = RedisDict(expire=timedelta(minutes=60))

cache['gone'] = 'in an hour'

```

And RedisDict only makes use of a single dependency, redis.py.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: