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的更多相关文章

  1. django-redis和redis-py

    项目之前使用memcache做缓存,现在转到redis,改写几个语句的事情,然后就这种我把django-redis和py-redis搞混了,记录一下. django默认使用memcache做缓存,这里 ...

  2. python 读取 redis -安装redis-py

    先下载  https://github.com/andymccurdy/redis-py 到本地 然后打开 Cmd.exe 进入当前目录 后执行 执行成功后,在python里检测 没有任何错误提示 就 ...

  3. Redis的Python客户端redis-py

    1. 安装 1. redis-py a. 使用easy_install 1 sudo easy_install redis  b. 源码安装 1 2 3 git clone https://githu ...

  4. Redis的Python客户端redis-py的初步使用

    1. Redis的安装 sudo pip install redis sudo pip install hiredis Parser可以控制如何解析redis响应的内容.redis-py包含两个Par ...

  5. 芝麻HTTP:redis-py的安装

    对于Redis来说,我们要使用redis-py库来与其交互,这里就来介绍一下它的安装方法. 1. 相关链接 GitHub:https://github.com/andymccurdy/redis-py ...

  6. python操作三大主流数据库(12)python操作redis的api框架redis-py简单使用

    python操作三大主流数据库(12)python操作redis的api框架redis-py简单使用 redispy安装安装及简单使用:https://github.com/andymccurdy/r ...

  7. 26.pymysql、pymongo、redis-py安装

    pymysql.pymongo.redis-py安装 1.将数据存入mysql借助pymysql2.和MongoDB进行交互,借助pymongo pip3 install pymysql(pip 安装 ...

  8. redis-py说明文件(转)

    转自:http://blog.sina.com.cn/s/blog_6262a50e0101574h.html 原文:https://github.com/andymccurdy/redis-py r ...

  9. ubuntu中pip安装redis-py及pip的使用

    安装redis-py的前提是已经将redis成功安装,redis安装过程请看博文 ubuntu14安装redis 1.安装pip sudo apt-get install python-pip 2.使 ...

  10. 使用Python客户端(redis-py)连接Redis--华为云DCS for Redis使用经验

    使用Python连接Redis,需要先安装Python以及redis-py,以CentOS为例,介绍redis-py的客户端环境搭建. 第0步:准备工作 华为云上购买1台弹性云服务器ECS(我选了Ce ...

随机推荐

  1. [LeetCode] 213. 打家劫舍 II

    题目链接:https://leetcode-cn.com/problems/house-robber-ii/ 题目描述: 你是一个专业的小偷,计划偷窃沿街的房屋,每间房内都藏有一定的现金.这个地方所有 ...

  2. golang 一个字符串表达式替换的函数

    package util import ( "fmt" "reflect" "regexp" "strconv" &qu ...

  3. 剑指offer-栈的压入、弹出序列-栈和队列-python

    题目描述 输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否可能为该栈的弹出顺序.假设压入栈的所有数字均不相等.例如序列1,2,3,4,5是某栈的压入顺序,序列4,5,3,2,1是该压 ...

  4. gulp程序怎么跑起来 及 使用中遇到的常见错误

    gulp常见问题 问题一:Error: cannot find module 'gulp-concat' #16 解答:需要先npm install,然后执行gulp gulp安装及使用 一.安装no ...

  5. ECMAScrip5 二

    一.ES5的严格模式 在严格模式下,声明变量必须使用 var 在严格模式下,不能使用八进制 在严格模式下,不能使用arguments.callee 在严格模式下,不能使用eval()    //eva ...

  6. DRF之三大认证

    一.用户认证Authorticatons 1.源码解析 第一步. 找入口 def dispatch(self, request, *args, **kwargs): # 1.首先我们进入的是APIVi ...

  7. python 模块发布及使用

    将模块(此处名为nester)写好后,与setup.py放入同一个文件夹中: //setup.py from distutils.core import setup setup( name=" ...

  8. mingetty - 控制台最小的 getty

    总览 SYNOPSIS mingetty [--noclear] [--nonewline] [--noissue] [--nohangup] [--nohostname] [--long-hostn ...

  9. diff 比较两个文件的不同

    1.命令功能 diff 逐行比较文件内容,并输出文件差异. 2.语法格式 diff  option   file1    file2 diff  选项   文件1   文件2 参数说明 参数 参数说明 ...

  10. Codeforces 912 质因数折半 方格数学期望

    A B #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) memset((a),b,sizeof(a)) #d ...