{ "info": { "author": "Dennis Mellican", "author_email": "dennis@mellican.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# SlackMQ\n\nSlack can do the heavy lifting of a simple Message Queue. When a message is received,\nit is \"locked\" while being processed. This keeps other worker bots from processing the\nmessage simultaneously.\n\nSlackMQ is suited to high latency message queuing applications due to rate limiting.\nFor a minimalist architecture, leverage the power of SlackMQ and a Slack bot becomes \nhighly available out of the box.\n\nTo install:\n```\npip install slackmq\n```\n\nThe Slack API allows pins to be added once per message per channel. Also, reactions\nand stars can be added to a message once per bot. For example, a person or bot cannot\npin a message that has already been pinned. A user or bot cannot give a post a thumbs \nup twice. In the UI, if you try, the action is revoked. In the API, an exception is \nthrown.\n\n![SlackMQ workflow](https://github.com/meltaxa/slackmq/blob/master/docs/slackmq-workflow.png?raw=true)\n\nSlack can be made to behave like a basic Message Queuing system by using pins to \nacknowledge (lock) and unacknowledge a message, as demonstrated in the diagram above. \nUsing pins is ideal as this allows \"unlimited\" bot workers. The Slack RTM API also \nallows a bot to connect multiple times. With this account concurrency, this method \nlimits the bot to 16 concurrent workers. You may find using a combination of pins, \nstars and reactions more reliable for low latency messages.\n\nTo use SlackMQ, wrap the post acknowledgement around a bot action. Below is an example\nof how a bot (using the slackbot library) uses SlackMQ to pull from the \"queue\", i.e, \nthe channel.\n\n```python\nfrom slackmq import slackmq\nfrom slackbot.bot import listen_to\nimport socket\n\nAPI_TOKEN = 'SLACK-BOT-API-TOKEN'\n\n\n@listen_to('hello')\ndef helloworld(message):\n post = slackmq(API_TOKEN,\n message.body['channel'], \n message.body['ts'])\n if post.ack():\n message.send('Hello from {}.'.format(socket.gethostname()))\n post.unack()\n```\n\n# Implementation Examples\n\nTroupe, which is a group of Slack bots working together to control and operate a smart \nhome implements SlackMQ. \n- See Troupe's source code for an insight into SlackMQ usage: https://github.com/meltaxa/troupe.\n\nAnother implementation of SlackMQ is to perform DevOps manoeuvres, such as\nRemote Management, Continuous Delivery, Canary Deployments and Rolling Updates. In the\nTroupe example, a Federation of Slack bots can self-update with zero downtime using the\nSlackMQ library. Watch The Travelling DevOps Troupe in action:\n\n[![The Travelling DevOps Troupe](http://img.youtube.com/vi/7TuYA2jt-Vc/0.jpg)](https://www.youtube.com/watch?v=7TuYA2jt-Vc \"The Travelling DevOps Troupe\")\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/meltaxa/slackmq", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "slackmq", "package_url": "https://pypi.org/project/slackmq/", "platform": "", "project_url": "https://pypi.org/project/slackmq/", "project_urls": { "Homepage": "https://github.com/meltaxa/slackmq" }, "release_url": "https://pypi.org/project/slackmq/0.1.2/", "requires_dist": [ "slacker (>=0.9.50)" ], "requires_python": "", "summary": "A Slack Message Queue system", "version": "0.1.2" }, "last_serial": 4805205, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3c415f2053cabd4867b2e0ce5246871f", "sha256": "d15e163f15a70d93e64f65437aa7cc375be684111065fb254c07defb96c466ee" }, "downloads": -1, "filename": "slackmq-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3c415f2053cabd4867b2e0ce5246871f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5033, "upload_time": "2018-10-02T03:05:05", "url": "https://files.pythonhosted.org/packages/c4/67/4cc05415628fc5c512ff9039fd0b4ef1f8bcae0db23a21b5e568bbbda788/slackmq-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed12c608d1224dd18cc3ec197dc2b250", "sha256": "b59e204c7e158dfd08e4d50ba46e25d98fc11aaf6377266dd576f16b42efe6c6" }, "downloads": -1, "filename": "slackmq-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ed12c608d1224dd18cc3ec197dc2b250", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3006, "upload_time": "2018-10-02T03:05:07", "url": "https://files.pythonhosted.org/packages/54/ae/00cac9b2cad9a820e0152c5aad9f3efb8d17d0831dab98ead0e57f619ef6/slackmq-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "83074a2f2c25114c589fe1f299f37584", "sha256": "41654088c569a618f78a0fb22f8c661dadcc93be89bee7d2a7becef1012c6e58" }, "downloads": -1, "filename": "slackmq-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "83074a2f2c25114c589fe1f299f37584", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3787, "upload_time": "2019-02-10T09:54:37", "url": "https://files.pythonhosted.org/packages/23/04/f9872161bdb56aa80a935939478d69d9eecbe28897a9d16fbbe921ab7fe5/slackmq-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45a37b260493838404c6e7e1b57d0011", "sha256": "83300dd5fab07bce225ac7176ea25d42c54da5310ad3455d7267cde6a44638ce" }, "downloads": -1, "filename": "slackmq-0.1.1.tar.gz", "has_sig": false, "md5_digest": "45a37b260493838404c6e7e1b57d0011", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3107, "upload_time": "2019-02-10T09:54:40", "url": "https://files.pythonhosted.org/packages/18/5d/0c09d0fa76570612c4c4644b061760009d7d53c0e88a88ba35739f189538/slackmq-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "38a8649df8cf08638d7b49af461ae0c7", "sha256": "a48181bdfb558d54fd9448c1df5ac496f168daa561dfeab6b5764e7938d53cac" }, "downloads": -1, "filename": "slackmq-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "38a8649df8cf08638d7b49af461ae0c7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3787, "upload_time": "2019-02-11T10:08:57", "url": "https://files.pythonhosted.org/packages/f6/24/19c9214a3048064b0c16b23e26d18ca40f09451a4387c124e23557a4d3b4/slackmq-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7341976339fe9e00f35c544336272ab1", "sha256": "df722fdf357a3464950eea9739aedb52055834d2234d1d99a6e94f948403022c" }, "downloads": -1, "filename": "slackmq-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7341976339fe9e00f35c544336272ab1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3084, "upload_time": "2019-02-11T10:08:59", "url": "https://files.pythonhosted.org/packages/17/6e/31bf4133366d523aff6950460aa0673bd4820f904c4bec6d55aeeb427b0a/slackmq-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38a8649df8cf08638d7b49af461ae0c7", "sha256": "a48181bdfb558d54fd9448c1df5ac496f168daa561dfeab6b5764e7938d53cac" }, "downloads": -1, "filename": "slackmq-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "38a8649df8cf08638d7b49af461ae0c7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3787, "upload_time": "2019-02-11T10:08:57", "url": "https://files.pythonhosted.org/packages/f6/24/19c9214a3048064b0c16b23e26d18ca40f09451a4387c124e23557a4d3b4/slackmq-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7341976339fe9e00f35c544336272ab1", "sha256": "df722fdf357a3464950eea9739aedb52055834d2234d1d99a6e94f948403022c" }, "downloads": -1, "filename": "slackmq-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7341976339fe9e00f35c544336272ab1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3084, "upload_time": "2019-02-11T10:08:59", "url": "https://files.pythonhosted.org/packages/17/6e/31bf4133366d523aff6950460aa0673bd4820f904c4bec6d55aeeb427b0a/slackmq-0.1.2.tar.gz" } ] }