{ "info": { "author": "Nicholas Amorim", "author_email": "nicholas@alienretro.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Communications :: Chat" ], "description": "bigslacker - Slack big while having a bot\n==========================================\n\nI would like to *thank* the [University of Tartu](http://www.ut.ee/et) and the [BIIT Research Group](http://biit.cs.ut.ee/) for allowing me to publish this as an open-source library.\n\nOverview\n---------\n\nbigslacker tries to be faithful to its name. It is a Bot for Slack that allows you to plug plugins (!) the easiest possible way. All you have to do is define a class that inherits from BasePlugin and define methods for the events.\n\nSupports Python 2 and 3.\n\nInstallation\n---------------\n\n#### Via PIP\n\n pip install bigslacker\n\n#### Manual\n\n git clone https://github.com/nicholasamorim/bigslacker.git\n python setup.py install\n\nSo far it has only one dependency, which is the official [slackclient](https://github.com/slackhq/python-slackclient).\n\nExample\n---------\n\n##### Creating a Bot with a plugin to listen on channel_created only\n\n```python\nfrom bigslacker import BigSlacker, BasePlugin\n\nclass ChannelAnnouncer(BasePlugin):\n def channel_created(self, data):\n print('I see a channel is created, gonna do something')\n\ntoken = '1239182918sxxusus'\nbs = BigSlacker(token)\nbs.slack()\n```\n\nYou don't have to do anything to register a plugin but inherit it from BasePlugin.\n\n\n##### Sending a message back\n\nWe analyze every returned data from any Plugin we call. If you return None we do nothing.\nHowever, if you reply with [(channel, message)], we will automatically send that message\nto the specified channel.\n\n```python\nfrom bigslacker import BigSlacker, BasePlugin\n\nclass ChannelAnnouncer(BasePlugin):\n def channel_created(self, data):\n print('I see a channel is created, gonna reply')\n return [('C1K4BBY8L', 'Hey guys, a channel has been created...')]\n\ntoken = '1239182918sxxusus'\nbs = BigSlacker(token)\nbs.slack()\n```\n\nOf course, if you add more elements to the list, we will also send those messages.\n\n\n##### I want every event in a single function\n\nSure. Just define a `catch_all` method.\n\n```python\nfrom bigslacker import BigSlacker, BasePlugin\n\nclass ChannelAnnouncer(BasePlugin):\n def catch_all(self, data):\n print('gonna inspect that data...')\n\ntoken = '1239182918sxxusus'\nbs = BigSlacker(token)\nbs.slack()\n```\n\n\n##### Can I use GEvent ?\n\nYes, all you have to do is monkey-patch it before on your application. Nothing else changes.\n\n\n```python\nfrom gevent import monkey\nmonkey.patch_all()\n```\n\n##### Can I call the Slack API from it?\n\nYes, we expose the interface. So just call api_call on it as usual.\n\n```python\nfrom bigslacker import BigSlacker\n\ntoken = '1239182918sxxusus'\nbs = BigSlacker(token)\nbs.api_call(\"api.test\")\nbs.slack()\n```\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nicholasamorim/bigslacker", "keywords": "api consumer client slack chat real time", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "bigslacker", "package_url": "https://pypi.org/project/bigslacker/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bigslacker/", "project_urls": { "Homepage": "https://github.com/nicholasamorim/bigslacker" }, "release_url": "https://pypi.org/project/bigslacker/0.1.1/", "requires_dist": [ "slackclient" ], "requires_python": "", "summary": "Slack RTM Client", "version": "0.1.1" }, "last_serial": 1921505, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "080b528e6528e6fb54f0488222b82ec3", "sha256": "63a654d383ec3ce79db5c2f74238392cf944b6a2fb30b601314fc80ecbb6bad8" }, "downloads": -1, "filename": "bigslacker-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "080b528e6528e6fb54f0488222b82ec3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3926, "upload_time": "2016-01-25T10:06:50", "url": "https://files.pythonhosted.org/packages/8c/f4/a36002f8ac47a6430e9cb2c17662c876b19852358a1c6d2713c129783dac/bigslacker-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23bc65c71d49ce8d53fb1205b1328f15", "sha256": "7867549a860ee86df19527aa5e640e05112cbcce0c20078e8c23adac0611ff61" }, "downloads": -1, "filename": "bigslacker-0.1.tar.gz", "has_sig": false, "md5_digest": "23bc65c71d49ce8d53fb1205b1328f15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15599, "upload_time": "2016-01-25T10:07:20", "url": "https://files.pythonhosted.org/packages/44/42/cb012dbd0806d049504df54b4cd2145fcbd2f76a6adaadb5be7bc41489a5/bigslacker-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d1d7152479c052ba8ecc9a0fef4bc931", "sha256": "1b6d825366b9bc43965b8fb328e982614a1a353fb013c2ed2ddfed1332898a3f" }, "downloads": -1, "filename": "bigslacker-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1d7152479c052ba8ecc9a0fef4bc931", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3978, "upload_time": "2016-01-25T10:11:00", "url": "https://files.pythonhosted.org/packages/10/7b/c104b6405835a645534eb31da0ebf6f8afc736fe078633c652d930982945/bigslacker-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9461b62f375a6361beb54afda9dcc8b", "sha256": "0d308b3d35d2b1aee7ed34c4012d110eeb20f020f55bd0d2d74c67ad8eab74b3" }, "downloads": -1, "filename": "bigslacker-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b9461b62f375a6361beb54afda9dcc8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15753, "upload_time": "2016-01-25T10:13:04", "url": "https://files.pythonhosted.org/packages/2a/0b/cd6ae65674e44d3ac9d5a895b6b2fed773e7debec9633ae8d6eadd52ab82/bigslacker-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d1d7152479c052ba8ecc9a0fef4bc931", "sha256": "1b6d825366b9bc43965b8fb328e982614a1a353fb013c2ed2ddfed1332898a3f" }, "downloads": -1, "filename": "bigslacker-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d1d7152479c052ba8ecc9a0fef4bc931", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3978, "upload_time": "2016-01-25T10:11:00", "url": "https://files.pythonhosted.org/packages/10/7b/c104b6405835a645534eb31da0ebf6f8afc736fe078633c652d930982945/bigslacker-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9461b62f375a6361beb54afda9dcc8b", "sha256": "0d308b3d35d2b1aee7ed34c4012d110eeb20f020f55bd0d2d74c67ad8eab74b3" }, "downloads": -1, "filename": "bigslacker-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b9461b62f375a6361beb54afda9dcc8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15753, "upload_time": "2016-01-25T10:13:04", "url": "https://files.pythonhosted.org/packages/2a/0b/cd6ae65674e44d3ac9d5a895b6b2fed773e7debec9633ae8d6eadd52ab82/bigslacker-0.1.1.tar.gz" } ] }