python3 redis get 获取keys值为 bytes
2021-02-24 本文已影响0人
Joncc
加上decode_responses=True
rdb = redis.StrictRedis(host="localhost", port=6379, db=0, decode_responses=True)
['013820201024', '013800000337', '013800000206', '13304904371', '013800000066', '013800000170', 'ADDR0000000010302392359', '013800000158', '013800000290', '013800000201']
[b'013800000297', b'013800000300', b'013800000242', b'013800000152', b'\xe6\xa1\x82BW6163', b'013800000183', b'013800000361', b'013800000219', b'013800000214', b'013800000108']