{ "info": { "author": "Young King", "author_email": "yanckin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "===============================\nRedis Protocol\n===============================\n\n.. image:: https://badge.fury.io/py/redis_protocol.png\n :target: http://badge.fury.io/py/redis_protocol\n \n.. image:: https://travis-ci.org/youngking/redis_protocol.png?branch=master\n :target: https://travis-ci.org/youngking/redis_protocol\n\n.. image:: https://pypip.in/d/redis_protocol/badge.png\n :target: https://crate.io/packages/redis_protocol?version=latest\n\n\nRedis Protocol implemented by python\n\n* Free software: BSD license\n* Documentation: http://redis_protocol.rtfd.org.\n\nUsage\n--------\nThis is the protocol implemented followed by `redis protocol specification `_.\nI had used it in my `redis_proxy `_ project.\n\n::\n\n >>> from redis_protocol import decode, encode\n >>> encode(\"ping\") # encode a request \n ... '*1\\r\\n$4\\r\\nping\\r\\n'\n >>> decode('*1\\r\\n$4\\r\\nping\\r\\n') # decode a request body\n ... [\"ping\"]\n >>> decode(\"$6\\r\\nfoobar\\r\\n\") # decode a response\n ... \"foobar\"\n\n\nparse redis protocol stream \n------\nparse redis protocol stream to redis commands\uff0csuch as redis pipeline requests or raw responses.\n\n::\n\n >>> from redis_protocol import parse_stream\n >>> data = '*3\\r\\n$3\\r\\nSET\\r\\n$15\\r\\nmemtier-8232902\\r\\n$2\\r\\nxx\\r\\n' \\\n '*3\\r\\n$3\\r\\nSET\\r\\n$15\\r\\nmemtier-8232902\\r\\n$2\\r\\nxx\\r\\n' \\\n '*3\\r\\n$3\\r\\nSET\\r\\n$15\\r\\nmemtier-7630684\\r\\n$3\\r\\nAAA\\r\\n'\n >>> print(parse_stream(data))\n ... ['SET memtier-8232902 xx', 'SET memtier-8232902 xx', 'SET memtier-7630684 AAA']\n\n\n\n\nHistory\n-------\n\n0.0.1 (2013-08-11)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": null, "docs_url": "https://pythonhosted.org/redis_protocol/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/youngking/redis_protocol", "keywords": "redis_protocol", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "redis_protocol", "package_url": "https://pypi.org/project/redis_protocol/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/redis_protocol/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/youngking/redis_protocol" }, "release_url": "https://pypi.org/project/redis_protocol/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Redis Protocol implemented by python", "version": "0.0.2" }, "last_serial": 1420295, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "368e36b809f643f6c6665c3b02a9dc21", "sha256": "aeb748c684b2ab875f3fd4853ff652642d5db7df2665ed13b4cfacd968803deb" }, "downloads": -1, "filename": "redis_protocol-0.0.1.tar.gz", "has_sig": false, "md5_digest": "368e36b809f643f6c6665c3b02a9dc21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4829, "upload_time": "2013-09-11T14:29:18", "url": "https://files.pythonhosted.org/packages/05/60/b9d3f41405b1057285c628b8e2949ce7c7ae76f04d9ec55364ae1d6d417c/redis_protocol-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "5305fa2db22281524d8243f79a596f6c", "sha256": "860ade1797b5a5899dc124ace3f4ad79bada8c8fcc170b8eba06a4d708719d1d" }, "downloads": -1, "filename": "redis_protocol-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5305fa2db22281524d8243f79a596f6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5331, "upload_time": "2015-02-12T04:57:55", "url": "https://files.pythonhosted.org/packages/23/2d/9e490987f382a00a140e0e220a1628a071e8bcc916bd113b22b0d60bfe3c/redis_protocol-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5305fa2db22281524d8243f79a596f6c", "sha256": "860ade1797b5a5899dc124ace3f4ad79bada8c8fcc170b8eba06a4d708719d1d" }, "downloads": -1, "filename": "redis_protocol-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5305fa2db22281524d8243f79a596f6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5331, "upload_time": "2015-02-12T04:57:55", "url": "https://files.pythonhosted.org/packages/23/2d/9e490987f382a00a140e0e220a1628a071e8bcc916bd113b22b0d60bfe3c/redis_protocol-0.0.2.tar.gz" } ] }