搭建完整redis数据库环境,及python连接教程
一、redis安装
http://www.runoob.com/redis/redis-install.html (菜鸟教程)
二、python连接redis数据库
# 连接redis数据库
res = redis.Redis(host="127.0.0.1", port=6666, password="ILOVEXH")
# redis操作
res.set("1",123456)
# 读取list
res.lrange("1",0,-1)
个人代码已存储在github:https://github.com/onlyhyl/database/tree/master/redis