{ "info": { "author": "Dax Reyes", "author_email": "raikage@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "= HookBox Notes =\n\nHookbox is a comet server and message queue that tightly integrates with web application frameworks. The goal of Hookbox is to allow your web application (php, django, rails, etc.) to handle all of the logic pertaining to authentication, authorization, logging, message transformation, etc, while still hiding the hard parts of Comet.\n\n== Hookbox HTTP Api ==\n\n=== /publish ===\n\nRequest\n\n URL: [HOOKBOX]/publish\n\nRequest Form:\n channel_name: The destination to publish the message\n payload: (default null) The payload for the message\n\nResponses\n true: It worked\n false: Some error occurred\n\n=== /channel_info ===\n\nRequest\n\n URL: [HOOKBOX]/channel_info\n\nRequest Form:\n channel_name: The destination to publish the message\n payload: (default null) The payload for the message\n\nResponse:\n true: It worked\n false: Some error occurred\n\nResponse Data\n channel_name (string): The name of the channel\n subscribers (list): List of channel subscribers\n reflective (bool): Does this channel reflect publishes to publisher\n history (int): Length of history kept in the channel\n\n=== /set_channel_options ===\n\nRequest\n\n URL: [HOOKBOX]/set_channel_options\n\nRequest Form:\n channel_name: The name of the channel to modify with the given options.\n reflective: (bool, default=true)\n history_size: (int, default=0) Determines the size of the history kept per channel. This history is sent to users when they subscribe to a channel.\n moderated: (bool, default=true) If true, then all events on the channel must be authorized via a callback.\n moderated_publish: (bool, default=true) If true, publish events must be authorized via a callback.\n moderated_subscribe: (bool, default=true) If true, subscribe events must be authorized via a callback.\n moderated_unsubscribe: (bool, default=true) If true, unsubscribe events must be authorized via a callback.\n presenceful: (bool, default=false) If true, presence lists will be attached to each publish frame. Also, SUBSCRIBED and UNSUBSCRIBED frames will be sent to all channel subscribers when another user subscribes or unsubscribes.\n anonymous: (bool, default=false) If true, usernames will be omitted from publish frames\nResponse:\n true: It worked\n false: Some error occurred\n\nResponse Data\n None\n\n== HookBox Webhooks ==\n\nEach webhook takes arguments in the form of a querystring encoded post body that should just work with existing form processing infrastructure.\n\nEach webhook returns a JSON list, of the form [ boolean, object ]. The first argument signifies the authorization/success of the operation, and the object contains various options that vary by hook type.\n\nAll webhooks will have a \"Cookie:\" header with a value identical to the browser that caused the request to be initiated. The \"context\" of the webhook call should therefore contain a session for the originating browser.\n\n\n=== connect ===\n\nRequest\n\n URL: [ROOT]/connect\n\nRequest Form:\n (empty)\n\nResponses:\n true: Authorize connection\n false: Deny connection\n\nResponse Options\n name (optional): the Display Name for this connection; it will be used for presence.\n auto_subscribe (optional): (list) A list of channels to attempt to auto-subscribe the user. Each will generate a subscribe callback.\n auto_unsubscribe (optional): (list) A list of channels to attempt to auto-unsubscribe the user. Each will generate an unsubscribe callback.\n\n=== create channel ===\n\nRequest\n URL: [ROOT]/create_channel\n\nRequest Form:\n destination: The channel's URI\n\n\nResponses:\n true: Authorize channel creation\n false: Deny channel creation\n\nResponse Options\n history: (int, default 0) Specifies the amount of history that should be saved on the channel. When a user first subscribes they will be sent this history.\n set_history: (list, default []) Pre-populates history for the channel\n\nNote: A create channel is issuing when a user subscribes to a non-existent destination. There will usually be a /subscribe callback immediately following a create_channel callback, unless the channel creation is denied.\n\n=== publish ===\n\nRequest\n URL: [ROOT]/publish\n\nRequest Form:\n destination: The channel's URI\n payload: The json payload to be published\n\nResponses:\n true: Authorize publishing\n false: Deny publishing\n\nResponse Options\n override_payload (optional): If specified, this payload will be delivered instead of the original payload\n auto_subscribe (optional): (list) A list of channels to attempt to auto-subscribe the user. Each will generate a subscribe callback.\n auto_unsubscribe (optional): (list) A list of channels to attempt to auto-unsubscribe the user. Each will generate an unsubscribe callback.\n\n\n=== unsubscribe ===\n\nRequest\n URL: [ROOT]/unsubscribe\n\nRequest Form:\n destination: The channel's URI\n\nResponses:\n true: Authorize unsubscribe\n false: Deny unsubscribe\n\nResponse Options\n auto_subscribe (optional): (list) A list of channels to attempt to auto-subscribe the user. Each will generate a subscribe callback.\n auto_unsubscribe (optional): (list) A list of channels to attempt to auto-unsubscribe the user. Each will generate an unsubscribe callback.\n\n\n=== disconnect ===\n\nRequest\n URL: [ROOT]/disconnect\n\nRequest Form:\n channels: (list) The channels the users was in.\n\nResponses:\n true: Required (Doesn't really do anything)\n false: Meaningless (but does the same as true.)\n\nResponse Options\n (None)\n\n== Overview ==\n\nA typical session with a Hookbox application might Look like this:\n\n1) User navigates to http://www.example.com/index.html\n The user is given a login page, which he fills out.\n2) Browser POSTs to http://www.example.com/login\n Included in the post body is the username and password\n3) Web application returns Cookie: session_id=abc;\n4) Web application redirects user to http://www.example.com/home\n The user is now logged into the application and sees the gui\n5) Browser calls hookbox.connect('http://hookbox.example.com')\n6) Browser send a CONNECT frame to hookbox, including { cookie: \"session_id=abc\"; }\n7) Hookbox makes an HTTP POST to http://www.example.com/hookbox/connect\n Hookbox includes the header \"Cookie: session_id=abc;\"\n8) The Web Application responds with a json payload: [ true, {}]\n This gives authorization for the client to connect\n9) Browser calls hookbox.publish('test.location', [\"Hello\", \"World\"]\n\n10) Hookbox makes an HTTP POST to http://www.example.com/hookbox/publish\n Hookbox includes the header \"Cookie: session_id=abc;\"\n Hookbox includes a query string in the POST body with the data\n payload=[\"Hello\", \"World\"]\n channel_name=test.location\n11) The Web app returns the json payload: [true, { } ]\n This gives authorization for the client to publish the message\n12) Hookbox sends a PUBLISH frame to all clients currently subscribed to the\n channel 'test.location'\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/raikage/hookbox", "keywords": null, "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "hookbox-dax", "package_url": "https://pypi.org/project/hookbox-dax/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hookbox-dax/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/raikage/hookbox" }, "release_url": "https://pypi.org/project/hookbox-dax/0.3.4a1/", "requires_dist": null, "requires_python": null, "summary": "HookBox is a Comet server and message queue that tightly integrates with your existing web application via web hooks and a REST interface.", "version": "0.3.4a1" }, "last_serial": 792979, "releases": { "0.3.4a1": [ { "comment_text": "", "digests": { "md5": "3253e302402123d20b693a139a81e8b1", "sha256": "6a409cebaea030d3133528ca8019063292c80a3f56814aabc4460d5220fd2af8" }, "downloads": -1, "filename": "hookbox_dax-0.3.4a1-py2.7.egg", "has_sig": false, "md5_digest": "3253e302402123d20b693a139a81e8b1", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 650256, "upload_time": "2012-07-04T10:57:05", "url": "https://files.pythonhosted.org/packages/ba/d7/32dd0b0b398dffcfebbea4c0e8c62e17c2f4eb0bf7a212631cbef79a8394/hookbox_dax-0.3.4a1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8a6a578ecfce44b9126eeb2486686441", "sha256": "1d8549fbb544ed383161dec50c9dc5ea0813df049160210b8ae79cd4bd8ef19d" }, "downloads": -1, "filename": "hookbox-dax-0.3.4a1.tar.gz", "has_sig": false, "md5_digest": "8a6a578ecfce44b9126eeb2486686441", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 559119, "upload_time": "2012-07-04T10:56:41", "url": "https://files.pythonhosted.org/packages/d8/ab/dfe52dcfbb7c1f68eea4c99e6c8dd0bc59599379167796feb5a5afec233b/hookbox-dax-0.3.4a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3253e302402123d20b693a139a81e8b1", "sha256": "6a409cebaea030d3133528ca8019063292c80a3f56814aabc4460d5220fd2af8" }, "downloads": -1, "filename": "hookbox_dax-0.3.4a1-py2.7.egg", "has_sig": false, "md5_digest": "3253e302402123d20b693a139a81e8b1", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 650256, "upload_time": "2012-07-04T10:57:05", "url": "https://files.pythonhosted.org/packages/ba/d7/32dd0b0b398dffcfebbea4c0e8c62e17c2f4eb0bf7a212631cbef79a8394/hookbox_dax-0.3.4a1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8a6a578ecfce44b9126eeb2486686441", "sha256": "1d8549fbb544ed383161dec50c9dc5ea0813df049160210b8ae79cd4bd8ef19d" }, "downloads": -1, "filename": "hookbox-dax-0.3.4a1.tar.gz", "has_sig": false, "md5_digest": "8a6a578ecfce44b9126eeb2486686441", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 559119, "upload_time": "2012-07-04T10:56:41", "url": "https://files.pythonhosted.org/packages/d8/ab/dfe52dcfbb7c1f68eea4c99e6c8dd0bc59599379167796feb5a5afec233b/hookbox-dax-0.3.4a1.tar.gz" } ] }