发布时间:2019-08-15 09:58:13编辑:auto阅读(1914)
只是看看能不能成功使用python操作redis,redis具体的数据结构和使用会在以后学习。
安装连接redis的包
pip install redis
本地已经在6379端口启动了redis服务。
In [1]: importredis
In [2]: r = redis.StrictRedis(host='localhost', port=6379, db=0)
In [3]: r.set('foo', 'bar')
Out[3]: True
In [4]: r.get('foo')
Out[4]: 'bar'
上一篇: 002-Python安装
下一篇: Python 3.7.0 正式发布,官方
51284
50736
41334
38144
32611
29514
28364
23233
23201
21526
1597°
2329°
1931°
1873°
2201°
1914°
2601°
4369°
4215°
2992°