Introduction to redisentΒΆ
This document will introduce the redisent Redis library which provides high-level serialization of Python objects to and from Redis.
There are two primary components to the redisent library:
-
This class provides the underlying Redis client implementation and, wherever possible, attempts to be agnostic about if the specific instance is being called using
asyncioor not. Whenuse_async=Trueis passed to this helper class, theaioredispackage will act as the Redis client. Otherwise the standardredis-pylibrary is used. -
By leveraging Python dataclasses, this base entity should be subclassed and provide further
field()entries for each attribute that should be mapped to Redis. The object itself will be encoded usingpickleso there is often no need for specific implementations if thepicklelibrary can encoe the object.