This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description
===============================
Redis Protocol
===============================

.. image:: https://badge.fury.io/py/redis_protocol.png
:target: http://badge.fury.io/py/redis_protocol

.. image:: https://travis-ci.org/youngking/redis_protocol.png?branch=master
:target: https://travis-ci.org/youngking/redis_protocol

.. image:: https://pypip.in/d/redis_protocol/badge.png
:target: https://crate.io/packages/redis_protocol?version=latest


Redis Protocol implemented by python

* Free software: BSD license
* Documentation: http://redis_protocol.rtfd.org.

Usage
--------
This is the protocol implemented followed by `redis protocol specification <http://redis.io/topics/protocol>`_.
I had used it in my `redis_proxy <https://github.com/youngking/redis_proxy>`_ project.

::

>>> from redis_protocol import decode, encode
>>> encode("ping") # encode a request
... '*1\r\n$4\r\nping\r\n'
>>> decode('*1\r\n$4\r\nping\r\n') # decode a request body
... ["ping"]
>>> decode("$6\r\nfoobar\r\n") # decode a response
... "foobar"


parse redis protocol stream
------
parse redis protocol stream to redis commands,such as redis pipeline requests or raw responses.

::

>>> from redis_protocol import parse_stream
>>> data = '*3\r\n$3\r\nSET\r\n$15\r\nmemtier-8232902\r\n$2\r\nxx\r\n' \
'*3\r\n$3\r\nSET\r\n$15\r\nmemtier-8232902\r\n$2\r\nxx\r\n' \
'*3\r\n$3\r\nSET\r\n$15\r\nmemtier-7630684\r\n$3\r\nAAA\r\n'
>>> print(parse_stream(data))
... ['SET memtier-8232902 xx', 'SET memtier-8232902 xx', 'SET memtier-7630684 AAA']




History
-------

0.0.1 (2013-08-11)
++++++++++++++++++

* First release on PyPI.
Release History

Release History

0.0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
redis_protocol-0.0.2.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Feb 12, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting