python操作redis

In [3]: redis.Redis()
Out[3]: Redis<ConnectionPool<Connection<host=localhost,port=6379,db=0>>>

In [4]: client=redis.Redis()

In [5]: client.get("name")
Out[5]: b'zs'


In [7]: client.hgetall("dog")
Out[7]: {b'color': b'white', b'name': b'xiaobao'}
posted @ 2023-04-13 23:10  Bre-eZe  阅读(11)  评论(0)    收藏  举报