Redis Client API

Source: Internet
Author: User
Tags install redis redis server

For information on the interface API implementations recommended by Redis for a variety of programming languages, refer to the http://redis.io/clients/

To select the Python language, use the Https://github.com/andymccurdy/redis-py

Installation

Redis-py requires a running Redis server. See Redis's QuickStart (Http://redis.io/topics/quickstart) for installation instructions.

To install Redis-py, simply:

$ sudo pip install Redis

Or alternatively (you really should is using PIP though):

$ sudo easy_install redis

or from Source:

$ sudo python setup.py install
Getting Started
>>>ImportRedis >>> r = redis. Strictredis (host= ' localhost '  span class= "n" >port=6379 db=< Span class= "Mi" >0) >>> r. Set ( ' foo '  ' bar ' true>>> r. Get ( ' foo ' )  ' bar '       

API Reference

The official Redis command documentation does a great job of explaining each command in detail. Redis-py exposes the client classes that implement these commands. The Strictredis class attempts to adhere to the official command syntax. There is a few exceptions:

Redis Client API

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.