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 ...
随机推荐
- 洛谷 - P1346 - 电车 - Dijkstra/01BFS
https://www.luogu.org/problem/P1346 使用最短路之前居然忘记清空了. #include<bits/stdc++.h> using namespace st ...
- nginx运行出现 file not found 错误处理原因
在阿里云装nginx+php+mysql nginx运行出现 file not found 错误处理原因 1,第一情况 location ~ \.php$ { # root html; fastcgi ...
- GitHub入门使用
1.首先注册账号. 2.新建仓库. 3.安装GitBash 4.首先要在本地创建一个ssh key. $ ssh -keygen -t rsa -C "your email@.com&quo ...
- bak文件恢复成 SQL2005 数据库 的全程讲解
经常会碰到客户给我们发的是一个bak的数据库备份文件,而不是一个数据库.这就需要我们把这数据文件还原成数据库的形式. 如将demo.bak数据库恢复到mssql2005下 打开SQL2005,打开后就 ...
- glup安装
资料参考:http://www.w3ctrain.com/2015/12/22/gulp-for-beginners/ 1.在安装 node 的环境后: npm install gulp -g 全局安 ...
- 一、IIS搭建前端静态模板_资源加载问题
一.模板文件说明和效果展示 二.IIS配置模板 三.解决方案 把资源文件复制到html目录内与index.htm同级,因为我iis指定站点就是该目录.
- 008-流程控制 case 语句
流程控制 case 语句 与if...elif...else 语句一样都是多分支条件语句,不过if语句可以判断多种条件关系,case只能判断一种条件关系 [root@zabbix lianxi]# . ...
- AtCoder Regular Contest 092 2D Plane 2N Points AtCoder - 3942 (匈牙利算法)
Problem Statement On a two-dimensional plane, there are N red points and N blue points. The coordina ...
- YUM源使用阿里镜像
备份系统自带的yum源 # 前提:需要联网才能使用 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bac ...
- 1.使用kubeadm安装kubernetes
一.环境准备 所有规划主机(一台master,两台node)均需操作 1.关闭防火墙,selinux [root@node1 ~]# systemctl stop firewalld [root@no ...