UI自动化web端框架myredis.py代码

import redis
from lib.core.config import ConfigType,Config
class MyRedis(object):
def __init__(self):
self.config = Config()
self.data = self.config.read(ConfigType.REDIS)
self.r = redis.Redis(**self.data)

def get(self,k):
return self.r.get(k)

def set(self,k,v):
self.r.set(k,v)

猜你喜欢

转载自www.cnblogs.com/laosun0204/p/9268011.html