码迷,mamicode.com
首页 > 编程语言 > 详细

[Chapt2] Python visit Redis based on HiRedis

时间:2016-05-24 06:59:44      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:hiredis

  1. michael@ubuntu:~$ wget -q http://peak.telecommunity.com/dist/ez_setup.py

  2. michael@ubuntu:~$ sudo python ez_setup.py

  3. michael@ubuntu:~$ sudo python -m easy_install redis hiredis

  4. michael@ubuntu:~$ python
    Python 2.7.3 (default, Jun 22 2015, 19:33:41)
    [GCC 4.6.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import redis
    >>> conn = redis.Redis()
    >>> conn.set(‘name‘,"Tom")
    True
    >>> conn.get(‘name‘)
    ‘Tom‘
    >>>


[Chapt2] Python visit Redis based on HiRedis

标签:hiredis

原文地址:http://yuanzhitang.blog.51cto.com/2769219/1782318

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!