redispy
w
wuser@ubuntu:~/redispy$ redis-cli
127.0.0.1:> keys *
) "w"
) "wpy"
127.0.0.1:> set w1 w1value
OK
127.0.0.1:> get w1
"w1value"
127.0.0.1:> keys *
) "w1"
) "w"
) "wpy"
127.0.0.1:>
https://pypi.python.org/pypi/redis
wuser@ubuntu:~$ ls
apiamzpy curl_get-pip.py dump.rdb redispy
wuser@ubuntu:~$ cd redispy
wuser@ubuntu:~/redispy$ ls
wuser@ubuntu:~/redispy$ su
Password:
root@ubuntu:/home/wuser/redispy# pip install redis
Collecting redis
Downloading redis-2.10.-py2.py3-none-any.whl (60kB)
% |████████████████████████████████| 61kB 107kB/s
Installing collected packages: redis
Successfully installed redis-2.10.
root@ubuntu:/home/wuser/redispy# exit
exit
wuser@ubuntu:~/redispy$ vim wredis.py
wuser@ubuntu:~/redispy$ python wredis.py wuser@ubuntu:~/redispy$ cat wredis.py
import redis
wr = redis.StrictRedis(host='localhost',port=,db=)
wr.set('wpy',)
print wr.get('wpy')
wuser@ubuntu:~/redispy$
redispy的更多相关文章
- django-redis和redis-py
项目之前使用memcache做缓存,现在转到redis,改写几个语句的事情,然后就这种我把django-redis和py-redis搞混了,记录一下. django默认使用memcache做缓存,这里 ...
- python 读取 redis -安装redis-py
先下载 https://github.com/andymccurdy/redis-py 到本地 然后打开 Cmd.exe 进入当前目录 后执行 执行成功后,在python里检测 没有任何错误提示 就 ...
- Redis的Python客户端redis-py
1. 安装 1. redis-py a. 使用easy_install 1 sudo easy_install redis b. 源码安装 1 2 3 git clone https://githu ...
- Redis的Python客户端redis-py的初步使用
1. Redis的安装 sudo pip install redis sudo pip install hiredis Parser可以控制如何解析redis响应的内容.redis-py包含两个Par ...
- 芝麻HTTP:redis-py的安装
对于Redis来说,我们要使用redis-py库来与其交互,这里就来介绍一下它的安装方法. 1. 相关链接 GitHub:https://github.com/andymccurdy/redis-py ...
- python操作三大主流数据库(12)python操作redis的api框架redis-py简单使用
python操作三大主流数据库(12)python操作redis的api框架redis-py简单使用 redispy安装安装及简单使用:https://github.com/andymccurdy/r ...
- 26.pymysql、pymongo、redis-py安装
pymysql.pymongo.redis-py安装 1.将数据存入mysql借助pymysql2.和MongoDB进行交互,借助pymongo pip3 install pymysql(pip 安装 ...
- redis-py说明文件(转)
转自:http://blog.sina.com.cn/s/blog_6262a50e0101574h.html 原文:https://github.com/andymccurdy/redis-py r ...
- ubuntu中pip安装redis-py及pip的使用
安装redis-py的前提是已经将redis成功安装,redis安装过程请看博文 ubuntu14安装redis 1.安装pip sudo apt-get install python-pip 2.使 ...
- 使用Python客户端(redis-py)连接Redis--华为云DCS for Redis使用经验
使用Python连接Redis,需要先安装Python以及redis-py,以CentOS为例,介绍redis-py的客户端环境搭建. 第0步:准备工作 华为云上购买1台弹性云服务器ECS(我选了Ce ...
随机推荐
- 洛谷P3366【模板】最小生成树-克鲁斯卡尔Kruskal算法详解附赠习题
链接 题目描述 如题,给出一个无向图,求出最小生成树,如果该图不连通,则输出orz 输入输出格式 输入格式: 第一行包含两个整数N.M,表示该图共有N个结点和M条无向边.(N<=5000,M&l ...
- Delphi主消息循环研究(Application.Run和Application.Initialize执行后的情况)
Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; 第一步,貌似什么都不做,但如果提前定义I ...
- linux中的文件类型以及查看文件类型的方法
Linux文件类型和文件的文件名所代表的意义是两个不同的概念,在linux中文件类型与文件扩展名没有关系.它不像Windows那样是依靠文件后缀名来区分文件类型的,在linux中文件名只是为了方便操作 ...
- maven多模块tomcat启动报 NoClassDefFoundError:com/test/main/message
maven多模块tomcat启动报 NoClassDefFoundError:com/test/main/message 扫描不到 添加子模块jar包
- Python性能分析工具Profile
Python性能分析工具Profile 代码优化的前提是需要了解性能瓶颈在什么地方,程序运行的主要时间是消耗在哪里,对于比较复杂的代码可以借助一些工具来定位,python 内置了丰富的性能分析工具,如 ...
- python 模块发布及使用
将模块(此处名为nester)写好后,与setup.py放入同一个文件夹中: //setup.py from distutils.core import setup setup( name=" ...
- 3.17内存,进程,rpm和yum,python编译安装
一.内存 前面说过内存有寄存器.高速缓存和内存条 但在实际情况中有些文件比较大,内存不足以读取其内容,并且大部分内容不是被立即使用,所以有了交换分区,即用硬盘空间临时存储相关部分,当作缓存,这部分就是 ...
- ubuntu上的疑难杂症(不定期更新……)
ubuntu系统英伟达显卡驱动怎么装 sudo apt-get purge nvidia* #如果之前安装过显卡驱动,就执行这一句来卸载 sudo apt-add-repository ppa:gra ...
- 运用在伪类content上的html特殊字符
原文转载于:https://www.cnblogs.com/wujindong/p/5630656.html 项目中用到的一些特殊字符和图标 html代码 <div class="cr ...
- ST7735和ST7789驱动
/* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __LCD_H #de ...