项目作者: AAAI-DISIM-UnivAQ

项目描述 :
Python RESTful interface to Redis
高级语言: Python
项目地址: git://github.com/AAAI-DISIM-UnivAQ/PyRESTRedis.git
创建时间: 2014-09-04T11:16:31Z
项目社区:https://github.com/AAAI-DISIM-UnivAQ/PyRESTRedis

开源协议:Apache License 2.0

下载


PyRESTRedis

Python RESTful simplified interface to Redis

To use it, have Redis server running, then run:

  1. $ python PyRESTRedis.py

and try Redis commands on port 8379:

to know which services are available: http://127.0.0.1:8379

  1. { "REDIS SERVICES": "INFO, GET, SET, EXISTS, PUBLISH, KEYS, SADD, SMEMBERS, HSET, HGET, HGETALL, /redis...." }

to get information about the available Redis server: http://127.0.0.1:8379/info

to set a key with its value: http://127.0.0.1:8379/SET/mykey/1

  1. { "SET": true }

to read a key content: http://127.0.0.1:8379/GET/mykey

  1. { "GET": "1" }

to check if a key exists: http://127.0.0.1:8379/EXISTS/mykey

  1. { "EXISTS": true }

to publish data to a Redis channel: http://127.0.0.1:8379/PUBLISH/myChannel/myData

  1. { "PUBLISH": 1 }

if the channel exists, otherwise:

  1. { "PUBLISH": 0 }

to get a list of keys from a pattern: http://127.0.0.1:8379/KEYS/_pattern_

other commands: sadd, smembers, hset,hget, hgetall.

Otehrs Redis commands with up to 3 arguments can be used with: http://127.0.0.1:8379/redis/_command_/_arg1_../_arg3_

Dependencies