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'))

 

 

    原文作者:顽强的allin
    原文地址: https://www.cnblogs.com/xiangxiaolin/p/11184994.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞