import redis
#redis的表名
redis_biao = "Ruijieac_sta"
#redis连接信息
redis_obj = redis.StrictRedis(host='IP地址', port=6379, db=1, password='密码')
# key='ytressdfg'
# value='22'
##写入
# redis_obj.hset(redis_biao, key, value)
#查询
req_redis=redis_obj.hget(redis_biao,"ytressdfg" )
if req_redis is not None:
req_redis = req_redis.decode("utf-8")
print(req_redis,type(req_redis))