📅  最后修改于: 2022-03-11 14:47:17.299000             🧑  作者: Mango
import redis
# Read from standalone REDIS
rd = redis.Redis(host='localhost',
port=6379,
db=0)
# write a key
rd.set("Key1", "hello")
# read a key
rd.get("Key1")