{ "info": { "author": "Armin Ronacher", "author_email": "armin.ronacher@active-4.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python" ], "description": "juggernaut\n~~~~~~~~~~\n\nDead simple Python library that connects to a juggernaut via\nredis. It also provides a very basic roster implementation that\ncan be used as a daemon process to manage online users.\n\nBasic usage\n-----------\n\nHow to send a message to all subscribers of a channel::\n\n from juggernaut import Juggernaut\n jug = Juggernaut()\n jug.publish('channel', {'message': 'Hello World!'})\n\nConnection Events\n-----------------\n\nJuggernaut also allows you to subscribe to events (new subscription,\nunsubscribe event) so that you can respond to users going online\nand offline::\n\n from juggernaut import Juggernaut\n jug = Juggernaut()\n for event, data in jug.subscribe_listen():\n if event == 'subscribe':\n ...\n elif event == 'unsubscribe':\n ...\n\nSince this is quite common this library also implements a Roster\nthat can group multiple connections to the same user. For grouping\nthis it uses a key in the meta part of the message. The default\nis ``user_id`` in the meta object.\n\nExample usage::\n\n from juggernaut import Juggernaut, RedisRoster\n jug = Juggernaut()\n roster = RedisRoster(jug)\n roster.run()\n\nBy default it keeps the number of online users in redis so that you\ncan use the roster class to see if users are online::\n\n >>> roster.get_online_users()\n [42, 23]\n >>> roster.is_user_online(42)\n True\n >>> roster.is_user_online(99)\n False\n\nIf you want to respond to users signing in and out you need to\noverride the `on_signed_in` and `on_signed_out` methods::\n\n class MyRoster(RedisRoster):\n def on_signed_in(self, user_id):\n print 'User signed in', user_id\n def on_signed_out(self, user_id):\n print 'User signed out', user_id\n\nYou can for instance use juggernaut to broadcast that to other\nusers that signed in.\n\n\n:copyright: (c) 2011 by Armin Ronacher.\n:license: BSD, see LICENSE for more details.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mitsuhiko/python-juggernaut", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "juggernaut", "package_url": "https://pypi.org/project/juggernaut/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/juggernaut/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mitsuhiko/python-juggernaut" }, "release_url": "https://pypi.org/project/juggernaut/0.2/", "requires_dist": null, "requires_python": null, "summary": "Client library for juggernaut.", "version": "0.2" }, "last_serial": 793853, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "008f3436df859d039743643c2463ab4a", "sha256": "46cf0c9e9c223fd9509100502c90b364138dce21ccd516b7d9e21da1275ef47c" }, "downloads": -1, "filename": "juggernaut-0.1.tar.gz", "has_sig": false, "md5_digest": "008f3436df859d039743643c2463ab4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3661, "upload_time": "2011-12-06T02:16:21", "url": "https://files.pythonhosted.org/packages/61/30/5484f545d56fee559cf74460cdf30cfda019114a85bad1e05c4caf3b35c2/juggernaut-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "08ee4843bc9b7ecc97a459fc3408c63e", "sha256": "4686cd4701279e01027a01fc9890dd52eb219450c10f961f8aaf8bf1f6bd9684" }, "downloads": -1, "filename": "juggernaut-0.2.tar.gz", "has_sig": false, "md5_digest": "08ee4843bc9b7ecc97a459fc3408c63e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3663, "upload_time": "2011-12-06T02:21:12", "url": "https://files.pythonhosted.org/packages/79/3f/6cd76096170ce0b6fb520bca2f11f42c06cd39c4db10e38e24526bbffd59/juggernaut-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "08ee4843bc9b7ecc97a459fc3408c63e", "sha256": "4686cd4701279e01027a01fc9890dd52eb219450c10f961f8aaf8bf1f6bd9684" }, "downloads": -1, "filename": "juggernaut-0.2.tar.gz", "has_sig": false, "md5_digest": "08ee4843bc9b7ecc97a459fc3408c63e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3663, "upload_time": "2011-12-06T02:21:12", "url": "https://files.pythonhosted.org/packages/79/3f/6cd76096170ce0b6fb520bca2f11f42c06cd39c4db10e38e24526bbffd59/juggernaut-0.2.tar.gz" } ] }