python3 redis数据库写入方法和json格式的坑

python3 redis数据库写入方法和json格式的坑import redis host xxx pwd xxx r redis Redis host host password pwd db 15 decode responses True port xxxx 1 第一种 r hmset test xxxxxx65 号 xxxxx65 写入 redis

大家好,我是讯享网,很高兴认识大家。

import redis

host = xxx

pwd = xxx


讯享网

r = redis.Redis(host=host,password=pwd,db=15,decode_responses=True,port=xxxx)  

1、第一种

r.hmset('test',{'xxxxxx65': "{'号': xxxxx65}"}) #写入redis

print(r.hgetall('test&

小讯
上一篇 2025-02-17 20:24
下一篇 2025-01-19 23:37

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/36793.html