Jedis python

python 客户都安 :redis-py
获取redis-py 基本使用

  1. pip install redis
  2. easy_install redis
  3. 源码安装

wget https://github.com/andymccurdy/redis-py/archive/master.zip
unzip master.zip
sudo python setup.py install

import redis 
client = redis.StrictRedis(host="127.0.0.1",port=6379);
key = "hello"
setResult = cleint.set(key,"python-redis");
print setResult();
value = client.get(key);
print "key"+key 
#5: 
client.zadd("myzset",99,"tom");

猜你喜欢

转载自blog.csdn.net/PYouLing123456789/article/details/83903791