crespo09 发表于 2018-8-11 09:11:21

[Redis]python连接redis-orangleliu笔记本

  只是看看能不能成功使用python操作redis,redis具体的数据结构和使用会在以后学习。
  安装连接redis的包
pip install redis  本地已经在6379端口启动了redis服务。
In : importredis  
In : r = redis.StrictRedis(host='localhost', port=6379, db=0)
  
In : r.set('foo', 'bar')
  
Out: True
  
In : r.get('foo')
  
Out: 'bar'
页: [1]
查看完整版本: [Redis]python连接redis-orangleliu笔记本