Redis quick start.
软件:
redis server https://github.com/MicrosoftArchive/redis/releases
redis python client, install using pip
步骤:
编写如下测试程序1.py
#https://pypi.org/project/redis/
#server https://github.com/MicrosoftArchive/redis/releases
import redis
r = redis.StrictRedis(host='localhost', port=6379, db=0)
r.set('foo', 'bar')
print(r.get('foo'))
print(r.get('NA'))
执行redis-server.exe
执行python 1.py
输出