import redis # 导入redis 模块
r = redis.StrictRedis(host='localhost', port=6379, db=0)
r.set('name', 'runoob') # 设置 name 对应的值
print(r['name'])
print(r.get('name')) # 取出键 name 对应的值
print(type(r.get('name'))) # 查看类型
python测试链接使用redis
猜你喜欢
转载自blog.csdn.net/qq_26018075/article/details/106979271
今日推荐
周排行