Python | Redis数据库操作
import redis r = redis.Redis(host='xxx', password='xxx', db=43, port=6001, decode_responses=True) # 或者 # redis_config = {'host':'xxx', 'password':'xxx', 'db':43, 'port':6001, 'decode_responses':'True'} # r = redis.Redis(**redis_config) print(r.get('74527_pre')) r.set('74527',0) print(r.get('74527'))
待补充...