asyncio-redis
asyncio-redis copied to clipboard
ZRangeReply do not have aslist method
as document say: http://asyncio-redis.readthedocs.io/en/latest/pages/reference.html#asyncio_redis.RedisProtocol.zrange
zrange(self, tr, key, start=0, stop=-1) Return a range of members in a sorted set, by index.
You can do the following to receive the slice of the sorted set as a python dict (mapping the keys to their scores):
result = yield protocol.zrange('myzset', start=10, stop=20) my_dict = yield result.asdict() or the following to retrieve it as a list of keys:
result = yield protocol.zrange('myzset', start=10, stop=20) my_dict = yield result.aslist()