python连接redis
程序员文章站
2023-11-04 12:14:28
1.python连接redis ......
1.python连接redis
from django.test import testcase import redis
conn = redis.redis(host='127.0.0.1') conn.set('key1', 'v1') conn.hset('n2', 'k2', 'v2') print(conn.get('key1'))
上一篇: Python使用字典的嵌套功能详解