{ "info": { "author": "Nolan Cooper", "author_email": "nolancooper97@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![Version](https://img.shields.io/pypi/v/friendbot.svg)](https://pypi.python.org/pypi/friendbot)\n[![Build Status](https://travis-ci.org/barrelmaker97/friendbot.svg?branch=master)](https://travis-ci.org/barrelmaker97/friendbot)\n[![Coverage Status](https://coveralls.io/repos/github/barrelmaker97/friendbot/badge.svg?branch=master)](https://coveralls.io/github/barrelmaker97/friendbot?branch=master)\n[![Python versions](https://img.shields.io/pypi/pyversions/friendbot.svg)](https://pypi.python.org/pypi/friendbot)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n# friendbot\nFriendbot is a Markov-chain based chatbot which uses Slack messages as its corpus. It reads in messages from a Slack data export, generates a corpus from them, and feeds this to a markov chain generator to naively simulate a conversation. It is a WSGI application, built with [Flask](https://github.com/pallets/flask), designed to be served with a WSGI HTTP server such as [Gunicorn](https://github.com/benoitc/gunicorn). The sentences which it generates can be accessed via an API.\n\n## Installation\n```\npip install friendbot\n```\n\n## API\n### /sentence\nThis endpoint accepts HTTP `POST` requests in the form of `application/x-www-form-urlencoded` and returns a sentence generated using the provided parameters. It reads the `text` key of the `POST`ed data and splits the value into arguments in the form of Slack channels `<#CHANNEL>` or users `<@USER>`. These are used to narrow the selection of messages Friendbot will read to generate its corpus. These arguments can be in any order and can also be left blank to include all channels/users. In most cases, responses from this endpoint will return a 200 status code, regardless of whether an error has occurred. This is because unfortunately, [Slack does not follow the HTTP spec](https://api.slack.com/slash-commands#responding_with_errors) and uses 200 to indicate that a request has been received even if an error occurs.\n\n### /action\nThis endpoint accepts HTTP `POST` requests in the form of `application/x-www-form-urlencoded`, extracts a JSON payload, sends a `POST` request to the Slack API based on the interaction that initiated the request, and returns a 200 status code. This provides the interactive component of Friendbot messages. These interactions consist of sending a generated sentence to the channel, shuffling to generate a new sentence, and cancelling sentence generation.\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/barrelmaker97/friendbot", "keywords": "markov chatbot wsgi slack", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "friendbot", "package_url": "https://pypi.org/project/friendbot/", "platform": "", "project_url": "https://pypi.org/project/friendbot/", "project_urls": { "Homepage": "https://github.com/barrelmaker97/friendbot" }, "release_url": "https://pypi.org/project/friendbot/0.2.1/", "requires_dist": [ "flask", "markovify", "requests" ], "requires_python": ">=3.4", "summary": "Markov-chain based chatbot which uses Slack messages as its corpus", "version": "0.2.1" }, "last_serial": 5817847, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "5577fc96d682eb593564e3e9c5ea832e", "sha256": "a32e271499c81670d43fdbbb6755a8cb1c5a182332de1b618b7d5fd97cf6379b" }, "downloads": -1, "filename": "friendbot-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5577fc96d682eb593564e3e9c5ea832e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4974, "upload_time": "2019-08-29T00:06:34", "url": "https://files.pythonhosted.org/packages/9a/3f/58bbaf3da4d89953c2566581d8e0e76fc3b976458a763e2a910ff1c77964/friendbot-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "03dd7a206408a8f469f3b7a9c25573bb", "sha256": "fc345dcd4a7a8c80660a9b4ea60d01b5dec1ba1273c09b7b289e1af45d048c4d" }, "downloads": -1, "filename": "friendbot-0.0.0.tar.gz", "has_sig": false, "md5_digest": "03dd7a206408a8f469f3b7a9c25573bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3404, "upload_time": "2019-08-29T00:06:36", "url": "https://files.pythonhosted.org/packages/eb/23/f4f5592b847f0609df05808ba4ccf95d254eb64ee8189dc2ef110d5e68e4/friendbot-0.0.0.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "85014604c4819ee01d8c20c7ac3df891", "sha256": "b89f75f9ef808d3ab3de875ac1a9ea31ef0d2a1e05a4dfd23d775895dee00b28" }, "downloads": -1, "filename": "friendbot-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "85014604c4819ee01d8c20c7ac3df891", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 5247, "upload_time": "2019-08-30T04:56:33", "url": "https://files.pythonhosted.org/packages/63/f0/71c0c601ab15ff59eab500766aa5da15ee4b0db0952cf2713d5f03792ea3/friendbot-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e12ce1f329f999c0a99a6d064e23acf5", "sha256": "f050e2842685f2b4914482a1e2904a445ba1467c134cc20573b45bf4aa7798c1" }, "downloads": -1, "filename": "friendbot-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e12ce1f329f999c0a99a6d064e23acf5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 3721, "upload_time": "2019-08-30T04:56:35", "url": "https://files.pythonhosted.org/packages/00/9f/9821ca36f9a6998d0b6842d6428aa9785f7be6d9ce569c167c25797212ba/friendbot-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5a51d27824af94f2a449f3c4b2473964", "sha256": "fe42e150c32ac096cff8958b9fb6a6f41e8ddedec797a59767ec606d37b94954" }, "downloads": -1, "filename": "friendbot-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5a51d27824af94f2a449f3c4b2473964", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 5269, "upload_time": "2019-08-30T14:42:38", "url": "https://files.pythonhosted.org/packages/92/21/cbe07386e6bb673b0d812aa2e7fa31be62dfbc515631d2cbe1d88bef22ac/friendbot-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dcb9e0dc2f2dc3772da62dff3f190f90", "sha256": "910ed6925a924e0bef5ac7328745ed2ea3b016b33725fbedea9a481070a7067d" }, "downloads": -1, "filename": "friendbot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dcb9e0dc2f2dc3772da62dff3f190f90", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 3738, "upload_time": "2019-08-30T14:42:40", "url": "https://files.pythonhosted.org/packages/de/3d/92397ba4d1ab5cbfa182b9264c97c54ae6685f48c7f23db1fdedb0d2e637/friendbot-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4608258f7ce4e88188c1bd6a44aad892", "sha256": "782d9e3487e8c8a6c43e066e15b5d099ae8fc8d887688870dea089d10097d1c5" }, "downloads": -1, "filename": "friendbot-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4608258f7ce4e88188c1bd6a44aad892", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 6331, "upload_time": "2019-09-10T01:08:01", "url": "https://files.pythonhosted.org/packages/ec/24/4626d10cdee43cf625975c7e0d24b36eed729eb8f0f58f66f3b9c46180da/friendbot-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a9411c3f79805efa0ebceab87c3be91", "sha256": "bc45b9118c7ff86168b260d4edb8b005faabc895bc0eeb201c1add02cd69fbf0" }, "downloads": -1, "filename": "friendbot-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1a9411c3f79805efa0ebceab87c3be91", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4827, "upload_time": "2019-09-10T01:08:03", "url": "https://files.pythonhosted.org/packages/ad/d3/7f3254347290b0cbd9b1999fde45d104a5d367776c6fe023b3c96895372c/friendbot-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "886c60368906e89953d420ff6aed6b18", "sha256": "e132ead5b3d8e8c65934f55c3f9acacf81c6e9090bd568addb5ecec6331d9d9a" }, "downloads": -1, "filename": "friendbot-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "886c60368906e89953d420ff6aed6b18", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 6444, "upload_time": "2019-09-12T02:23:28", "url": "https://files.pythonhosted.org/packages/9f/28/9d4a6f3207b9accf7ef7fb41189cf6f77bf0375ab99901ff797d3c6af9d7/friendbot-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3e847f0584634e6b791ecd634eb720a", "sha256": "0c11fc04017578c6fb5a600b62650758f19d4041cae155b95c4c5c416d032f15" }, "downloads": -1, "filename": "friendbot-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e3e847f0584634e6b791ecd634eb720a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4936, "upload_time": "2019-09-12T02:23:30", "url": "https://files.pythonhosted.org/packages/f4/b1/ecec7a57cbcccafb018b8ad34e6acc7dd7d38de16756360e40079fd32d33/friendbot-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "886c60368906e89953d420ff6aed6b18", "sha256": "e132ead5b3d8e8c65934f55c3f9acacf81c6e9090bd568addb5ecec6331d9d9a" }, "downloads": -1, "filename": "friendbot-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "886c60368906e89953d420ff6aed6b18", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 6444, "upload_time": "2019-09-12T02:23:28", "url": "https://files.pythonhosted.org/packages/9f/28/9d4a6f3207b9accf7ef7fb41189cf6f77bf0375ab99901ff797d3c6af9d7/friendbot-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3e847f0584634e6b791ecd634eb720a", "sha256": "0c11fc04017578c6fb5a600b62650758f19d4041cae155b95c4c5c416d032f15" }, "downloads": -1, "filename": "friendbot-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e3e847f0584634e6b791ecd634eb720a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4936, "upload_time": "2019-09-12T02:23:30", "url": "https://files.pythonhosted.org/packages/f4/b1/ecec7a57cbcccafb018b8ad34e6acc7dd7d38de16756360e40079fd32d33/friendbot-0.2.1.tar.gz" } ] }