python3 可用 reids集群对应版本

redis 2.10.6
redis-py-cluster 1.3.6

简单实用:

startup_nodes = [
{"host": "ip", "port": port},
   {"host": "ip", "port": port}
]
# 连接集群
conn = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=True)
下面和redis 库操作一致
conn.hset(XXX)
 
posted @ 2020-01-03 19:45  南风。  阅读(370)  评论(0编辑  收藏  举报