# __*__coding=utf-8__*__
import redis
class Redis:
def __init__(self):
host = "10.*.*.*"
port = 6379
dbbase = 12
password = "pwd"
conn_pool = redis.ConnectionPool(host=host, password=password, port=port, db=dbbase, decode_responses=True)
self.r = redis.Redis(connection_pool=conn_pool)
def get(self, key):
return self.r.get(key)
def set(self, key, value):
self.r.set(key, value)