{ "info": { "author": "Mohamed abdeljelil", "author_email": "abdeljelil.mohamed@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: Unix", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "Websocket_redis\n=============\n``websocket_redis`` is an asynchronous python module gather two projects `websockets `_ and `aioredis `_ to make the communication between the client and backend as easy as possible without losing any message has been sent from the client.\n\n=============\nInstallation\n=============\n\nInstall from Pypi:\n________________________\n\n.. code-block:: bash\n\n $ pip install websocket_redis\n\nManually installation:\n________________________\n\n.. code-block:: bash\n \n # we assume you already created the python virtualenv\n # get the latst version from master branch\n $ wget -O websocket_redis.zip https://github.com/Abdeljelil/websocket_redis/archive/master.zip\n $ unzip websocket_redis.zip\n $ cd websocket_redis-master\n $ make install\n # run tests (optional)\n $ pip install nose\n $ make test\n \n`pypi `_.\n\nUsage examples\n--------------\n\nOverride WSHandler Methodes:\n\n.. code:: python\n\n import asyncio\n from websocket_redis.server.ws_server import WSServer\n from websocket_redis.server.ws_handler import WSHandler\n \n \n class MyWSHandler(WSHandler):\n \n @asyncio.coroutine\n def on_close(self, code):\n \n print(\"Session {} has closed, client : {}\".format(\n self.session_id, self.client))\n \n @asyncio.coroutine\n def on_error(self, e):\n \n print(\"Exception {} has raised, client : {}\".format(\n e, self.client))\n \n @asyncio.coroutine\n def on_message(self, text):\n \n print(\"Message \\'{}\\' has received from client : {}\".format(\n text, self.client))\n \n @asyncio.coroutine\n def on_send(self, text):\n \n print(\"Message \\'{}\\' will be sent to {}\".format(\n text, self.client))\n\nStart Websocker server:\n\n.. code:: python\n\n ws_connection = dict(\n host=\"127.0.0.1\",\n port=5678)\n\n redis_connection = dict(\n address=(\"localhost\", 6379)\n )\n\n loop = asyncio.get_event_loop()\n server = WSServer(\n ws_connection=ws_connection,\n redis_connection=redis_connection,\n app_name=\"test_app\",\n ws_handler_class=MyWSHandler\n )\n\n try:\n loop.run_until_complete(server.run())\n loop.run_forever()\n except KeyboardInterrupt:\n server.close()\n loop.close()\n\nAsync API:\n\n.. code:: python\n\n import asyncio\n \n from websocket_redis.api.async import APIClientListener\n\n\n class MyAPIClientListener(APIClientListener):\n \n @asyncio.coroutine\n def on_message(self, message):\n \n print(\"new message {}\".format(message.text))\n yield from message.reply(\"Hi!\")\n\n redis_connection = dict(\n address=(\"localhost\", 6379)\n )\n handler = MyAPIClientListener(redis_connection, app_name=\"test_app\")\n loop = asyncio.get_event_loop()\n \n loop.run_until_complete(handler.run())\n\nThreaded API:\n\n.. code:: python\n\n from websocket_redis.api.threading import APIClientListener\n \n \n class MyAPIClientListener(APIClientListener):\n \n def on_message(self, message):\n \n print(\"new message {}\".format(message.text))\n message.reply(\"Hi!\")\n \n redis_connection = dict(\n host=\"localhost\",\n port=6379\n )\n handler = MyAPIClientListener(redis_connection, app_name=\"test_app\")\n \n handler.run()\n\n.. |build| image:: https://travis-ci.org/Abdeljelil/websocket_redis.svg?branch=master\n :target: https://travis-ci.org/Abdeljelil/websocket_redis\n :alt: Travis-ci build\n.. |cversion| image:: https://img.shields.io/pypi/v/websocket_redis.svg\n :target: https://pypi.python.org/pypi/websocket_redis\n :alt: Python versions supported\n.. |versions| image:: https://img.shields.io/pypi/pyversions/websocket_redis.svg\n :target: https://pypi.python.org/pypi/websocket_redis\n :alt: Python versions supported\n.. |codecov| image:: https://codecov.io/github/Abdeljelil/websocket_redis/websocket_redis.svg?branch=master\n :target: http://codecov.io/github/Abdeljelil/websocket_redis?branch=master\n :alt: Coverage!\n.. |status| image:: https://img.shields.io/pypi/status/websocket_redis.svg\n :target: https://pypi.python.org/pypi/websocket_redis\n :alt: Package stability", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Abdeljelil/websocket_redis.git", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Abdeljelil/websocket_redis", "keywords": "python websocket redis asyncio", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "websocket_redis", "package_url": "https://pypi.org/project/websocket_redis/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/websocket_redis/", "project_urls": { "Download": "https://github.com/Abdeljelil/websocket_redis.git", "Homepage": "https://github.com/Abdeljelil/websocket_redis" }, "release_url": "https://pypi.org/project/websocket_redis/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Communicate with websocket through redis as messaging broker", "version": "0.1.2" }, "last_serial": 2265955, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2c85f94e2954a4701e7ff0b01c3cd281", "sha256": "3a16c7dc452ec588ab662aa810960a9a7ec521011228b64a930b891f84557f50" }, "downloads": -1, "filename": "websocket_redis-0.0.1.tar.gz", "has_sig": false, "md5_digest": "2c85f94e2954a4701e7ff0b01c3cd281", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4811, "upload_time": "2016-08-02T12:59:19", "url": "https://files.pythonhosted.org/packages/7d/cb/d9db4b69af240abc9ada66e4fbdf9de24bd97d6010b5963a9af784aa3feb/websocket_redis-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c09218ace4e0bf8c8f2e2c2192014075", "sha256": "c7c3648ada4eb4880950d6f0d5a2e410a0ae9052dd4dcabccdc2f00d987ed57a" }, "downloads": -1, "filename": "websocket_redis-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c09218ace4e0bf8c8f2e2c2192014075", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4884, "upload_time": "2016-08-02T18:57:22", "url": "https://files.pythonhosted.org/packages/96/93/38b821e3f22c96cbf191c34df693fe6d61868ea6a91382500cfb39cc28e4/websocket_redis-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "17656e76a11b46681bca6d714a4cd443", "sha256": "1f2f5ec74e61a7d868b066fc452f4e5888f48bca807a195f3e53098b6281df7d" }, "downloads": -1, "filename": "websocket_redis-0.0.3.tar.gz", "has_sig": false, "md5_digest": "17656e76a11b46681bca6d714a4cd443", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4996, "upload_time": "2016-08-02T19:49:30", "url": "https://files.pythonhosted.org/packages/61/46/561736c2aa62aedb7c150185968ab18913906ca51053d9eb1aba59a1c1e9/websocket_redis-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "d556c6cf5edfd769f8d52dca99946867", "sha256": "28c8b6ddbcaebfcb8864ee9731840e1bb06ec33d94e116c80c0a83c5f1f1e8ec" }, "downloads": -1, "filename": "websocket_redis-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d556c6cf5edfd769f8d52dca99946867", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5483, "upload_time": "2016-08-02T23:58:43", "url": "https://files.pythonhosted.org/packages/9f/6d/b529c0021d40f06be11676f0c0677afdb49e82c26d5a16b427aace44e6f9/websocket_redis-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "70011f0cb57986d2037a313c308b1dd6", "sha256": "41844d04bcd126b008351633d65c1fe761348832c005f04aacdefac4b67f1eed" }, "downloads": -1, "filename": "websocket_redis-0.0.5.tar.gz", "has_sig": false, "md5_digest": "70011f0cb57986d2037a313c308b1dd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5924, "upload_time": "2016-08-05T00:43:22", "url": "https://files.pythonhosted.org/packages/75/3f/94944e6b5887edaf5179c01d642a83218e2a9a873943abf23c983285df66/websocket_redis-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "2eb5ce1da1951e95c4379ef2418fbbad", "sha256": "d7e9fa0e898f747843f5f99461f4e2abf12ebc70e7e6303153cf6f4f8241851c" }, "downloads": -1, "filename": "websocket_redis-0.0.6.tar.gz", "has_sig": false, "md5_digest": "2eb5ce1da1951e95c4379ef2418fbbad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4348, "upload_time": "2016-08-05T17:47:32", "url": "https://files.pythonhosted.org/packages/95/1a/95896dade5643d6ff9a397dc6698457bc8a79d2c5b8e70c1311a9cb9b9b9/websocket_redis-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "13de3dbd9b66d4af310e58440aa0c2ed", "sha256": "1fa0b3407c579143ea648d747d6b579d4e19199d3a79f4a19821a50d6d72dd79" }, "downloads": -1, "filename": "websocket_redis-0.0.7.tar.gz", "has_sig": false, "md5_digest": "13de3dbd9b66d4af310e58440aa0c2ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6874, "upload_time": "2016-08-06T09:51:32", "url": "https://files.pythonhosted.org/packages/73/ff/94c2e6a59a51d3389679ea42571ea5778cba2a788954a721560954e65c88/websocket_redis-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "cb25602600b365b1dc1cab7ac77645b5", "sha256": "cdc9ccedc9f6e92d0479b6ab7c9504ef30effe0339f150f2d7d929f6506fd2d2" }, "downloads": -1, "filename": "websocket_redis-0.0.8.tar.gz", "has_sig": false, "md5_digest": "cb25602600b365b1dc1cab7ac77645b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6874, "upload_time": "2016-08-06T10:02:39", "url": "https://files.pythonhosted.org/packages/b8/27/9dfcd8fc4385172b428e822c38e1180d1ef83cfdf53fa4e9cb74d68cb67d/websocket_redis-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "3c06718ea3f71957dddcf71aa53185af", "sha256": "49044415a5363658e37e809e63b072c56daeb13550209e6d241e23f506e579c3" }, "downloads": -1, "filename": "websocket_redis-0.0.9.tar.gz", "has_sig": false, "md5_digest": "3c06718ea3f71957dddcf71aa53185af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7138, "upload_time": "2016-08-06T12:15:41", "url": "https://files.pythonhosted.org/packages/41/96/57dc41379856f9b15afb498358602dcb2305a65ff2c03a89d9dd43c176ad/websocket_redis-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "7327b91f8076605ac74acef8214a88e5", "sha256": "a3f919a0e7cc69aec0badbe6ebeffd6db7503464eadcca491bf61e2180a44d69" }, "downloads": -1, "filename": "websocket_redis-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7327b91f8076605ac74acef8214a88e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8770, "upload_time": "2016-08-06T14:02:50", "url": "https://files.pythonhosted.org/packages/3d/92/dc209491edb0fc3b552faa28bacc83bf9ea77e267364d53297a1ef7cebce/websocket_redis-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0163aaa55a9ffe85dc6233b4c89eec33", "sha256": "9ff3b09e843ed5ea2b740483e3f85e58f6a7b51d3000749ca81fef8ccd4182c9" }, "downloads": -1, "filename": "websocket_redis-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0163aaa55a9ffe85dc6233b4c89eec33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8765, "upload_time": "2016-08-06T14:04:58", "url": "https://files.pythonhosted.org/packages/0e/11/1da9affb498ce648c543b226d3b81be8b7ed66ac59cc9c1dad35e59599fd/websocket_redis-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "f47223dd1a5eb11f1acc8b9a3c4a9081", "sha256": "20bcce1b7a164e6e9832418a2e92623f86100d21df4b2c947a6ac19509884d35" }, "downloads": -1, "filename": "websocket_redis-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f47223dd1a5eb11f1acc8b9a3c4a9081", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9161, "upload_time": "2016-08-06T19:47:46", "url": "https://files.pythonhosted.org/packages/8b/7a/d99873c9b29691949f99d21804825ec89f695153882e41400d77837bad7e/websocket_redis-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f47223dd1a5eb11f1acc8b9a3c4a9081", "sha256": "20bcce1b7a164e6e9832418a2e92623f86100d21df4b2c947a6ac19509884d35" }, "downloads": -1, "filename": "websocket_redis-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f47223dd1a5eb11f1acc8b9a3c4a9081", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9161, "upload_time": "2016-08-06T19:47:46", "url": "https://files.pythonhosted.org/packages/8b/7a/d99873c9b29691949f99d21804825ec89f695153882e41400d77837bad7e/websocket_redis-0.1.2.tar.gz" } ] }