{ "info": { "author": "Hank Preston", "author_email": "hank.preston@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "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", "Programming Language :: Python :: 3.7" ], "description": "# webexteamsbot\n\nThis package makes creating [Webex Teams](https://www.webex.com/products/teams/index.html) bots in Python super simple. \n\n[![PyPI version](https://badge.fury.io/py/webexteamsbot.svg)](https://badge.fury.io/py/webexteamsbot) [![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/hpreston/webexteamsbot)\n\n> This package is based on the previous [ciscosparkbot](https://github.com/imapex/ciscosparkbot) project. This version will both move to new Webex Teams branding as well as add new functionality. If you've used `ciscosparkbot` you will find this package very similar and familiar. \n\n# Prerequisites\n\nIf you don't already have a [Webex Teams](https://www.webex.com/products/teams/index.html) account, go ahead and [register](https://www.webex.com/pricing/free-trial.html) for one. They are free.\n\n1. You'll need to start by adding your bot to the Webex Teams website.\n\n [https://developer.webex.com/my-apps](https://developer.webex.com/my-apps)\n\n1. Click **Create a New App**\n\n ![add-app](https://github.com/hpreston/webexteamsbot/raw/master/images/newapp.jpg)\n\n1. Click **Create a Bot**.\n\n ![create-bot](https://github.com/hpreston/webexteamsbot/raw/master/images/createbot.jpg)\n\n2. Fill out all the details about your bot. You'll need to set a name, username, icon (either upload one or choose a sample), and provide a description.\n\n ![add-bot](https://github.com/hpreston/webexteamsbot/raw/master/images/newbot.jpg)\n\n3. Click **Add Bot**.\n\n1. On the Congratulations screen, make sure to copy the *Bot's Access Token*, you will need this in a second.\n\n ![enter-details](https://github.com/hpreston/webexteamsbot/raw/master/images/botcongrats.jpg)\n\n# Installation\n\n> Python 3.6+ is recommended. Python 2.7 should also work. \n\n1. Create a virtualenv and install the module\n\n ```\n python3.6 -m venv venv\n source venv/bin/activate\n pip install webexteamsbot\n ```\n\n# Usage\n\n1. The easiest way to use this module is to set a few environment variables\n\n > Note: See [ngrok](#ngrok) for details on setting up an easy HTTP tunnel for development.\n\n ```\n export TEAMS_BOT_URL=https://mypublicsite.io\n export TEAMS_BOT_TOKEN=\n export TEAMS_BOT_EMAIL=\n export TEAMS_BOT_APP_NAME=\n ```\n\n1. A basic bot requires very little code to get going. \n\n ```python\n import os\n from webexteamsbot import TeamsBot\n\n # Retrieve required details from environment variables\n bot_email = os.getenv(\"TEAMS_BOT_EMAIL\")\n teams_token = os.getenv(\"TEAMS_BOT_TOKEN\")\n bot_url = os.getenv(\"TEAMS_BOT_URL\")\n bot_app_name = os.getenv(\"TEAMS_BOT_APP_NAME\")\n\n # Create a Bot Object\n bot = TeamsBot(\n bot_app_name,\n teams_bot_token=teams_token,\n teams_bot_url=bot_url,\n teams_bot_email=bot_email,\n )\n\n\n # A simple command that returns a basic string that will be sent as a reply\n def do_something(incoming_msg):\n \"\"\"\n Sample function to do some action.\n :param incoming_msg: The incoming message object from Teams\n :return: A text or markdown based reply\n \"\"\"\n return \"i did what you said - {}\".format(incoming_msg.text)\n\n\n # Add new commands to the box.\n bot.add_command(\"/dosomething\", \"help for do something\", do_something)\n\n\n if __name__ == \"__main__\":\n # Run Bot\n bot.run(host=\"0.0.0.0\", port=5000)\n ```\n\n1. A [sample script](https://github.com/hpreston/webexteamsbot/blob/master/sample.py) that shows more advanced bot features and customization is also provided in the repo. \n\n\n# ngrok\n\n[ngrok](http://ngrok.com) will make easy for you to develop your code with a live bot.\n\nYou can find installation instructions here: [https://ngrok.com/download](https://ngrok.com/download)\n\n1. After you've installed `ngrok`, in another window start the service\n\n ```\n ngrok http 5000\n ```\n\n1. You should see a screen that looks like this:\n\n ```\n ngrok by @inconshreveable (Ctrl+C to quit)\n\n Session Status online\n Version 2.2.4\n Region United States (us)\n Web Interface http://127.0.0.1:4040\n Forwarding http://this.is.the.url.you.need -> localhost:5000\n Forwarding https://this.is.the.url.you.need -> localhost:5000\n\n Connections ttl opn rt1 rt5 p50 p90\n 2 0 0.00 0.00 0.77 1.16\n\n HTTP Requests\n -------------\n\n POST / 200 OK\n ```\n\n1. Make sure and update your environment with this url:\n\n ```\n export TEAMS_BOT_URL=https://this.is.the.url.you.need\n\n ```\n\n1. Now launch your bot!!\n\n ```\n python sample.py\n ```\n\n## Local Development\n\nIf you have an idea for a feature you would like to see, we gladly accept pull requests. To get started developing, simply run the following..\n\n```\ngit clone https://github.com/hpreston/webexteamsbot\ncd webexteamsbot\npip install -r requirements_dev.txt\npython setup.py develop\n```\n\n### Linting\n\nWe use flake 8 to lint our code. Please keep the repository clean by running:\n\n```\nflake8\n```\n\n### Testing\n\nTests are located in the [tests](./tests) directory.\n\nTo run the tests in the `tests` folder, you can run the following command\nfrom the project root.\n\n```\ncoverage run --source=webexteamsbot setup.py test\ncoverage html\n```\n\nThis will generate a code coverage report in a directory called `htmlcov`\n\n# Credits\nThe initial packaging of the original `ciscosparkbot` project was done by [Kevin Corbin](https://github.com/kecorbin). \n\nThis package was created with\n[Cookiecutter](https://github.com/audreyr/cookiecutter) and the\n[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage)\nproject template.\n\n\n# History\n\n## 0.1.0 (2018-11-10)\n\n - First release on PyPI.\n\n## 0.1.1 (2018-11-10)\n\n - Second release on PyPI.\n\n## 0.1.2 (2018-11-11)\n\n - Added feature to easily change the bot greeting\n - Updated Example bot `sample.py` with better documentation and examples\n - Allow Response() objects to specify alternative roomId for reply\n\n## 0.1.2.1 (2018-11-11)\n\n - Updated README with a very simple bot example with a link to the full sample.py script\n\n## 0.1.3.0 (2019-10-03)\n\n - Adding new features for cards and membership management (Thanks @joshand!)\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/hpreston/webexteamsbot", "keywords": "webexteamsbot", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "webexteamsbot", "package_url": "https://pypi.org/project/webexteamsbot/", "platform": "", "project_url": "https://pypi.org/project/webexteamsbot/", "project_urls": { "Homepage": "https://github.com/hpreston/webexteamsbot" }, "release_url": "https://pypi.org/project/webexteamsbot/0.1.3.0/", "requires_dist": [ "webexteamssdk", "Flask (>=0.12.1)" ], "requires_python": "", "summary": "A Flask based Webex Teams chat bot.", "version": "0.1.3.0" }, "last_serial": 5925993, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "01e0875efee2fecd0f2f95e996522ea5", "sha256": "798ad311a080ce0f52fbebd838a6b0463b6e2473a2fe3b97101dcdf4aeab3b05" }, "downloads": -1, "filename": "webexteamsbot-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "01e0875efee2fecd0f2f95e996522ea5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9438, "upload_time": "2018-11-11T01:37:53", "url": "https://files.pythonhosted.org/packages/16/85/4b88033b727e3166014571ef1d3409fe4afa90c56ec7d3b3a875a408784e/webexteamsbot-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e1d15a764e8f31aeef99c7777b4c518", "sha256": "fb2212af21383e3f0e126a46856ba4c37f24a1b2d91d3882747a28042be245a3" }, "downloads": -1, "filename": "webexteamsbot-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9e1d15a764e8f31aeef99c7777b4c518", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15641, "upload_time": "2018-11-11T01:37:55", "url": "https://files.pythonhosted.org/packages/49/27/a2a5cfd3f3b7cfea051bff5b3af2a188e8277d248b5f54c7ebfe932c2378/webexteamsbot-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0747d29a254c5fdc66ea3ee3cc46f286", "sha256": "940f23d062118232e22e69e7203914720022cbb39bcfab167e10e377f05598fd" }, "downloads": -1, "filename": "webexteamsbot-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0747d29a254c5fdc66ea3ee3cc46f286", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9453, "upload_time": "2018-11-11T01:44:50", "url": "https://files.pythonhosted.org/packages/74/61/48ba9f2c60e1518023af53340098f4de02fcd24e2f97bd703176c53537be/webexteamsbot-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5498a279e4b2ddab9e7e826760f872fc", "sha256": "810cef96ab8c072a622851628cdacb00ae16346088e67b6b658dee5d7497225b" }, "downloads": -1, "filename": "webexteamsbot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5498a279e4b2ddab9e7e826760f872fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15662, "upload_time": "2018-11-11T01:44:52", "url": "https://files.pythonhosted.org/packages/5e/cf/98cdd401d5b26b646afeb1b2f475f15146591253e9cd01e84058277c7f25/webexteamsbot-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "39e1c345d4b8de17ccf8c70f1f68815e", "sha256": "d0a1544343f419274931057fb09864d4148d279ed7e65ddb069a61b2075f4c6d" }, "downloads": -1, "filename": "webexteamsbot-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "39e1c345d4b8de17ccf8c70f1f68815e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10897, "upload_time": "2018-11-12T03:24:55", "url": "https://files.pythonhosted.org/packages/cd/f6/fb9e2c0df384c06908e8f8eb6ff399ab8e297559e5f6796bcac8c4db62f6/webexteamsbot-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30fed2284d3bae72b0580b97f0b9bf4a", "sha256": "e9fada8a959de0f93623f932a4c60a5bd7249d7d1a32fcc783e8753a78eda2e1" }, "downloads": -1, "filename": "webexteamsbot-0.1.2.tar.gz", "has_sig": false, "md5_digest": "30fed2284d3bae72b0580b97f0b9bf4a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20317, "upload_time": "2018-11-12T03:24:56", "url": "https://files.pythonhosted.org/packages/b5/98/3ffebef8bc9504da742a3bf45f78db147d7ef7fece0caa0bfc7e16364f2d/webexteamsbot-0.1.2.tar.gz" } ], "0.1.2.1": [ { "comment_text": "", "digests": { "md5": "b646c8afa601c0aea8ebdd3b77d852ff", "sha256": "2526036bd55c3d2485be3fa1f0edf4d65c617d1fb634d0093904a3c7115d13a1" }, "downloads": -1, "filename": "webexteamsbot-0.1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b646c8afa601c0aea8ebdd3b77d852ff", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9772, "upload_time": "2018-11-12T03:48:35", "url": "https://files.pythonhosted.org/packages/be/cb/1f48d883a67942c7f8cec70fcbaf6118f1850109434aa3858953ce9d174b/webexteamsbot-0.1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bf6289809fa5b55466a6d35374b42468", "sha256": "f79ce2cc9b226860f18b559319af3effe6c968b595886b13a903984eca4f9819" }, "downloads": -1, "filename": "webexteamsbot-0.1.2.1.tar.gz", "has_sig": false, "md5_digest": "bf6289809fa5b55466a6d35374b42468", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17912, "upload_time": "2018-11-12T03:48:36", "url": "https://files.pythonhosted.org/packages/88/13/0fc67c54c17c2f9902f568d550851cdd2409af4ea65336c5d5be6425ff8a/webexteamsbot-0.1.2.1.tar.gz" } ], "0.1.2a0": [ { "comment_text": "", "digests": { "md5": "ac0fafd492ade8078fbccd1d3d9cadb0", "sha256": "68de4c199f840662213212764f568c6f328f4e38e9c33d060ec474125cd97ba2" }, "downloads": -1, "filename": "webexteamsbot-0.1.2a0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ac0fafd492ade8078fbccd1d3d9cadb0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9772, "upload_time": "2018-11-12T03:46:31", "url": "https://files.pythonhosted.org/packages/3e/98/4107adbf85a689dfd6ff471ccc17fa4ddb6418e52b79ec1aee930a79abdc/webexteamsbot-0.1.2a0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "11d35a70e6050682e6d9b878e6a3d4dc", "sha256": "eac298d005dadaf1278307b8521de937c1c5b708c0d49dccf4d414a2baf1ac25" }, "downloads": -1, "filename": "webexteamsbot-0.1.2a0.tar.gz", "has_sig": false, "md5_digest": "11d35a70e6050682e6d9b878e6a3d4dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17912, "upload_time": "2018-11-12T03:46:32", "url": "https://files.pythonhosted.org/packages/50/60/71494aa4e631524265e5f6b6781b50a06be231a7ea53da155e448ff0f701/webexteamsbot-0.1.2a0.tar.gz" } ], "0.1.3.0": [ { "comment_text": "", "digests": { "md5": "9558319690cce0568735d12f17adce6c", "sha256": "7937870941ec03dbcd1ca4757b77a0e358ab671820cd251d7132cddf4149f870" }, "downloads": -1, "filename": "webexteamsbot-0.1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9558319690cce0568735d12f17adce6c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10586, "upload_time": "2019-10-04T00:39:30", "url": "https://files.pythonhosted.org/packages/a9/22/021d03ac492dfe02d585ee3cd396176bfe1a53e3a06224b3a180a9b5f3b1/webexteamsbot-0.1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9e1cdc9ce75d4c0ecd08bfe8b5cc93f", "sha256": "5976b33d87aa17fa7b43e97cff6567c363cb849aec44d2dc16bb65c5d44d3323" }, "downloads": -1, "filename": "webexteamsbot-0.1.3.0.tar.gz", "has_sig": false, "md5_digest": "a9e1cdc9ce75d4c0ecd08bfe8b5cc93f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19433, "upload_time": "2019-10-04T00:39:31", "url": "https://files.pythonhosted.org/packages/74/fa/7254324bf72041aa9f1a744be6b162455f02949a293509c41007be4ffb55/webexteamsbot-0.1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9558319690cce0568735d12f17adce6c", "sha256": "7937870941ec03dbcd1ca4757b77a0e358ab671820cd251d7132cddf4149f870" }, "downloads": -1, "filename": "webexteamsbot-0.1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9558319690cce0568735d12f17adce6c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10586, "upload_time": "2019-10-04T00:39:30", "url": "https://files.pythonhosted.org/packages/a9/22/021d03ac492dfe02d585ee3cd396176bfe1a53e3a06224b3a180a9b5f3b1/webexteamsbot-0.1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a9e1cdc9ce75d4c0ecd08bfe8b5cc93f", "sha256": "5976b33d87aa17fa7b43e97cff6567c363cb849aec44d2dc16bb65c5d44d3323" }, "downloads": -1, "filename": "webexteamsbot-0.1.3.0.tar.gz", "has_sig": false, "md5_digest": "a9e1cdc9ce75d4c0ecd08bfe8b5cc93f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19433, "upload_time": "2019-10-04T00:39:31", "url": "https://files.pythonhosted.org/packages/74/fa/7254324bf72041aa9f1a744be6b162455f02949a293509c41007be4ffb55/webexteamsbot-0.1.3.0.tar.gz" } ] }