redis client API

想知道redis针对各种编程语言推荐的接口API实现,请参考http://redis.io/clients/

选择python语言,则使用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 be using pip though):

$ sudo easy_install redis

or from source:

$ sudo python setup.py install

Getting Started

>>> import redis
>>> r = redis.StrictRedis(host=‘localhost‘, port=6379, db=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 two client classes that implement these commands. The StrictRedis class attempts to adhere to the official command syntax. There are a few exceptions:

时间: 2024-08-24 20:46:12

redis client API的相关文章

lettuce--Advanced Redis client

redis官方提供的java client: git地址:https://github.com/mp911de/lettuceAdvanced Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.http://redis.paluch.biz Introduction Lettuce is a scalable thread

Redis client Python usage

mport redis r_server = redis.Redis('localhost') #this line creates a new Redis object and #connects to our redis server r_server.set('test_key', 'test_value') #with the created redis object we can #submits redis commands as its methods print 'previou

测试Beetle.Redis+Web Api

在Web Api里用Beetle.Redis调用Redis服务端的TIME命令返回一个json格式,然后客户端是用的HttpTest4Net做的测试: CPU:I7-3770 内存:4G+4G 硬盘:SSD 网络:本机 Redis服务端:2.6.12(Windows版本) Redis客户端:Beetle.Redis(我改过的版本) .Net Framework:4.0 IIS:7.5 Web Api 测试用例1: 测试用例2: 总结一下:Users和KeepAlive的设置对每秒处理数量影响不大

redis client protocol 解析

在官网http://redis.io/topics/protocol有对redis通信协议有做说明. 基于下面的一些原因,我想解析redis client protocol: 1.足够了解通信协议,有助于做出更好的系统设计. 2.学习RESP的设计思想,不仅能扩展我的思维,也许将来能应用于我的代码中. 3.因为有些人想将redis client直接并入自己已有的系统中:包括我在内.这个将在我下一篇文章再做说明. 下面我翻译一下http://redis.io/topics/protocol一些我认

HBase Client API使用入门(二)---查询及过滤器

相关知识 创建表插入数据删除等见:http://www.cnblogs.com/wishyouhappy/p/3735077.html HBase API简介见:http://www.cnblogs.com/wishyouhappy/p/3753347.html 按行.列簇等查询 package wish.hbase; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org

Memcached Java Client API详解

针对Memcached官方网站提供的java_memcached-release_2.0.1版本进行阅读分析,Memcached Java客户端lib库主要提供的调用类是SockIOPool和MemCachedClient?,关键类及方法整理说明如下. SockIOPool 这个类用来创建管理客户端和服务器通讯连接池,客户端主要的工作包括数据通讯.服务器定位.hash码生成等都是由这个类完成的. public static SockIOPool getInstance() 获得连接池的单态方法.

StackExchange.Redis Client

StackExchange.Redis Client 这期我们来看StackExchange.Redis,这是redis 的.net客户端之一.Redis是一个开源的内存数据存储,可以用来做数据库,缓存或者消息代理服务.目前有不少人在使用ServiceStack.Redis这个.net客户端,但是这个的最新版本目前已经变成了商业软件.对于ServiceStack.Redis这种行为,我们没有什么好说的,留给我们的选择是使用低版本的开源版本或者转向其他的客户端. 要说到StackExchange.

ecshop /api/client/api.php、/api/client/includes/lib_api.php SQL Injection Vul

catalog 1. 漏洞描述 2. 漏洞触发条件 3. 漏洞影响范围 4. 漏洞代码分析 5. 防御方法 6. 攻防思考 1. 漏洞描述 ECShop存在一个盲注漏洞,问题存在于/api/client/api.php文件中,提交特制的恶意POST请求可进行SQL注入攻击,可获得敏感信息或操作数据库 http://sebug.net/vuldb/ssvid-21007 2. 漏洞触发条件 1. /api/client/api.php存在未过滤漏洞 2. 服务器magic_quote_gpc =

ElasticSearch--------------------->Elasticsearch Clients--------------------->Java REST Client API

Elasticsearch-->Java REST Client API 概述: elasticsearch提供了REST WEB API,所以开发者可以在自己的restful web中调用elasticsearch 关于Java REST Client API的详细叙述,参见官方documentation:Java REST Client API 可以直接使用curl来调用elasticsearch: 基本语法格式:RESTful API with JSON over HTTP 使用示例: 例