redis示例
pip3 install redis
#!python3
import redis
client = redis.Redis(host="localhost", port=6379, db=0)
key = "/redis"
client.set(key, "<HTML><H1>Hi, Redis!</H1></HTML>")
resp = client.get(key)
print(resp)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
pip3 install redis
#!python3
import redis
client = redis.Redis(host="localhost", port=6379, db=0)
key = "/redis"
client.set(key, "<HTML><H1>Hi, Redis!</H1></HTML>")
resp = client.get(key)
print(resp)