Jedis python

歷精圖治發表於2018-11-09

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");

相關文章