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. QT linux下显示中文的问题

    如果中文显示为乱码,那么是字符集不对. 应该设置字符集: QTextCodec::setCodecForLocale(QTextCodec::codecForName("GBK") ...

  2. Optional接口简记

    @Data public class Employee { private String name; } @Data public class Company { private String nam ...

  3. loadkeys - 调入键盘翻译表

    总览 (SYNOPSIS) loadkeys [ -d --default ] [ -h --help ] [ -q --quiet ] [ -v --verbose [ -v --verbose ] ...

  4. Asc函数与Chr函数

    返回值: Integer    返回字符串中第一个字符的字符代码.    提示: Chr函数可以将一个Ascii码转换为相对应的字符 语法:   Asc(string) string,必须参数,字符串 ...

  5. ssh修改超时自动登出时间的方法

    echo $TMOUT 查看当前服务器登出时间,如果没有输出表示不会登出 1.修改:vim ~/.bash_profile 2.设置TMOUT值 TMOUT=600 #表示10分钟之后自动登出 TMO ...

  6. Manacher || Luogu P3805【模板】manacher算法

    题面:[模板]manacher算法 代码: #include<cstdio> #include<cstring> #include<iostream> #defin ...

  7. 设置mysql数据表列自动递增以及数据行插入操作

    创建mysql数据表,设置id列递增.主键create table running_log ( id int primary key auto_increment, routename varchar ...

  8. Linux如何配置ftp服务器、给ftp服务器添加访问用户

    本人qq群也有许多的技术文档,希望可以为你提供一些帮助(非技术的勿加). QQ群:   281442983 (点击链接加入群:http://jq.qq.com/?_wv=1027&k=29Lo ...

  9. 【Luogu5293】[HNOI2019] 白兔之舞

    题目链接 题目描述 略 Sol 考场上暴力 \(O(L)\) 50分真良心. 简单的推一下式子,对于一个 t 来说,答案就是: \[\sum_{i=0}^{L} [k|(i-t)] {L\choose ...

  10. 【bzoj 4554】【Tjoi2016&Heoi2016】【NOIP2016模拟7.12】游戏

    题目 分析 当没有石头的时候,就用二分图匹配来做. 但现在加入了石头, 所以,求出每行和每列联通快的个数,如果有一块平地,包括在某个行联通块以及某个列联通块中,连边. //无聊打了网络流,匈牙利也可以 ...