![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Redis
涛哥带你学编程
技术小白,虔诚的修行者。希望一步一步登上高峰
展开
-
批量导入数据到Redis
背景:推荐系统实战过程中,需要将生成的item-item:score数据导入到redis数据库中,便于之后的在线查询方法:Redis2.6之后,redis-cli支持pipe模式进行批量插入数据我们只需要将数据格式化为:SET key value(空格隔开)之后在命令行使用管道的方式导入即可:cat insert_file | redis-cli --pipe具体操作如下:1....原创 2019-01-23 11:06:33 · 8665 阅读 · 2 评论 -
解决ImportError: No module named redis
背景python查询Redis数据库中的数据,显示没有redis模块解决方法1.使用pip工具安装redis模块pip install redis2.下载redis的python接口redis-py下载地址点这里git clone https://github.com/andymccurdy/redis-pycd redis-py/python setup.py install...原创 2019-01-23 14:46:39 · 30531 阅读 · 3 评论