{ "info": { "author": "Paul-weqe", "author_email": "paul1tw1@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "[![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/Paul-weqe/python_webex_bot)\n[![PyPI version](https://badge.fury.io/py/python-webex-bot.svg)](https://badge.fury.io/py/python-webex-bot)\n\n# python_webex_bot\n\nA python3 library meant to help you create a cisco webex teams bot and take advantage of some of the features available to these bots. \nMost of the python libraries setup for webex have been lacking in terms of connecting you to a webhook and this aims at solving that\n\n## Installation and setup\n\nThe following are items this documentation assumes you already have installed\n- virtualenv\n- python3\n- ngrok\n\n### Step 1: setup the virtual environment\n\nto initialize the virtual environment, run the following command in your Command Line or Command Prompt\n```\nvirtualenv venv\n```\n\nthen we activate it:\n\nWindows\n```\nvenv\\Scripts\\activate\n```\n\nLinux\n```\nsource venv/bin/activate\n```\n\nand there, you have your virtual environment setup and ready for action\n\n### Step 2: install python_webex_bot\n\nwhile still in your activated virtual environment, run the following command to install python_webex_bot via pip:\n\n```\npip install python_webex_bot\n```\n\nthen download ngrok which will be used in the concurrent steps\n\n## Quickstart\n\nLets get a simple bot up, running and responsive on our local machine. \n\n### Step 1: Create the bot on Cisco Webex\n\nIf you haven't already, create your Webex account. \nThen head on to create your bot\n\nYou should be provided with an access token for the bot.\n\nTake this access token and place it in your environment variable as auth_token.\n\nthis can be done via your Command prompt or Command Line as:\n```\nset auth_token=my_auth_token\n```\n\nreplace my_auth_token with your bots access token\n\nThis is a crutial part of running your bot as the python_webex_bot library uses this to identify your bot\n\nIf you still have some questions on environment variables, why we need them and how to use them, this may be a good start\n\n### Step 2: setup ngrok\n\nin a different terminal from the one used in steps 1 and 2, navigate to the folder where you have the ngrok placed. \n\nThen run the following command:\n```\nngrok http 5000\n```\n\nThis should produce an output similar to the one shown below:\n```\nSession Status online\nSession Expires 7 hours, 59 minutes\nUpdate update available (version 2.3.25, Ctrl-U to update)\nVersion 2.3.18\nRegion United States (us)\nWeb Interface http://127.0.0.1:4040\nForwarding http://87a942a1.ngrok.io -> http://localhost:5000\nForwarding https://87a942a1.ngrok.io -> http://localhost:5000\n\nConnections ttl opn rt1 rt5 p50 p90\n 0 0 0.00 0.00 0.00 0.00\n```\n\nNow you are ready for the quest\n\n### Step 3: create the python file and run it \n\nCreate a python file where you intend to run the bot. In my case, I will name my file `run.py`\n\ncopy and paste the following code:\n\n```\nfrom python_webex.v1.Bot import Bot\nfrom python_webex import webhook\n\nbot = Bot() # the program will automatically know the bot being referred to y the auth_token\n\n# create a webhook to expose it to the internet\n# rememer that url we got from step 2, this is where we use it. In my case it was http://87a942a1.ngrok.io. \n# We will be creating a webhook that will be listening when messages are sent\nbot.create_webhook(\n name=\"quickstart_webhook\", target_url=\"http://87a942a1.ngrok.io\", resource=\"messages\", event=\"created\"\n)\n\n# we create a function that responds when someone says hi\n# the room_id will automatically be filled with the webhook. Do not forget it\n@bot.on_hears(\"hi)\ndef greet_back(room_id=None):\n return bot.send_message(room_id=room_id, text=\"Hi, how are you doing?\")\n\n# We create a default response in case anyone types anything else that we have not set a response for\n# this is done using * [ don't ask me what happend when someone sends '*' as the message, that's on my TODO]\n@bot.on_hears(\"*\")\ndef default_response(room_id=None):\n return bot.send_message(room_id=room_id, text=\"Sorry, could not understand that\")\n\n\n# make the webhook know the bot to be listening for, and we are done\nwebhook.bot = bot\n\nif __name__ == \"__main__\":\n webhook.app.run(debug=True) # don't keep debug=True in production\n```\n\nNow, when we text our bot \"hi\", it will respond with \"Hi, how are you doing?\"\n\nAnd when we text anything else, like \"When can we meet up?\" it will respond with \"Sorry, I could not understand that\"\n\n\nMORE DOCUMENTATION TO BE SETUP SHORTLY\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/Paul-weqe/python_webex_bot", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-webex-bot", "package_url": "https://pypi.org/project/python-webex-bot/", "platform": "", "project_url": "https://pypi.org/project/python-webex-bot/", "project_urls": { "Homepage": "https://github.com/Paul-weqe/python_webex_bot" }, "release_url": "https://pypi.org/project/python-webex-bot/0.70/", "requires_dist": [ "atomicwrites", "attrs", "backcall", "certifi", "chardet", "Click", "colorama", "coverage", "decorator", "Flask", "idna", "itsdangerous", "jedi", "Jinja2", "MarkupSafe", "more-itertools", "parso", "pickleshare", "pluggy", "prompt-toolkit", "py", "Pygments", "pytz", "requests", "six", "traitlets", "urllib3", "virtualenv", "wcwidth", "Werkzeug" ], "requires_python": "", "summary": "In this version, we enable the pre installation of other python packages", "version": "0.70" }, "last_serial": 5490316, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "fc78c4226878fb4a913b930921ffb969", "sha256": "3e063509c0e32735c50cfa95f7515d87d8e4e629534f79e2cc56bb12df2c399a" }, "downloads": -1, "filename": "python_webex_bot-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fc78c4226878fb4a913b930921ffb969", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7665, "upload_time": "2019-04-04T04:20:45", "url": "https://files.pythonhosted.org/packages/ed/df/1c26b92dba9479b0610b5ea2e75c7d828b7d29fc0ac1289f6ad1902bcd15/python_webex_bot-0.2-py3-none-any.whl" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "16dad0c1d265ee639b38add708a4de80", "sha256": "dfb23fc466fb46ab4fc238301ccd97b65881a613f92ec7432e54c727f8cbcb7e" }, "downloads": -1, "filename": "python_webex_bot-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "16dad0c1d265ee639b38add708a4de80", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12586, "upload_time": "2019-04-04T06:06:22", "url": "https://files.pythonhosted.org/packages/99/fe/a1f8ecbf9598cbf1cf9c1fbad53ca0c5e72c4bb935595d06f5612f244280/python_webex_bot-0.3-py3-none-any.whl" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "ad237fad61ac3ad5cf3b26771c2bee13", "sha256": "a2eb8b27391d071c3fbf28a5096df2ca7a403cf01ebf3f7634eb8de322321751" }, "downloads": -1, "filename": "python_webex_bot-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "ad237fad61ac3ad5cf3b26771c2bee13", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17682, "upload_time": "2019-04-04T06:06:23", "url": "https://files.pythonhosted.org/packages/1c/77/87876d47df534ba60b9da703e6640482aab5f35713de9fe1a5af06b19ebc/python_webex_bot-0.4-py3-none-any.whl" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "9782da12b396a33e31705895268b5e87", "sha256": "52326f788e3f5e8487417461252c401d23e7753e481166b57f0ea0077474e24d" }, "downloads": -1, "filename": "python_webex_bot-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "9782da12b396a33e31705895268b5e87", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7500, "upload_time": "2019-04-04T06:20:49", "url": "https://files.pythonhosted.org/packages/17/53/943e3b6c5f2ca45288096528bf765d19dc198cf03f8de03fb684b5978523/python_webex_bot-0.5-py3-none-any.whl" } ], "0.51": [ { "comment_text": "", "digests": { "md5": "d59b7f229ef7b8b9a8bff5607574c8ff", "sha256": "7ccc1fee0ee5a66e0a1225a9ab4730b15ee1cc00d2e8ae428b4cdbbf2b9d523c" }, "downloads": -1, "filename": "python_webex_bot-0.51-py3-none-any.whl", "has_sig": false, "md5_digest": "d59b7f229ef7b8b9a8bff5607574c8ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7879, "upload_time": "2019-04-04T07:13:52", "url": "https://files.pythonhosted.org/packages/1e/83/4186312c84a2e2d0364bd1b033eb887f2ac2c9689692a789b542b830850e/python_webex_bot-0.51-py3-none-any.whl" } ], "0.52": [ { "comment_text": "", "digests": { "md5": "b9bda6c777f7b66ed5ac77a4ccfc8bf8", "sha256": "496d733b451e9483a08455541f11fe39bedcc4f7ec0d10e6693f07795cb31981" }, "downloads": -1, "filename": "python_webex_bot-0.52-py3-none-any.whl", "has_sig": false, "md5_digest": "b9bda6c777f7b66ed5ac77a4ccfc8bf8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7706, "upload_time": "2019-04-04T07:27:26", "url": "https://files.pythonhosted.org/packages/f3/16/01feeba9e9ad3e5251517a29e6576f4318b8a1b2bad5031437cfc051541c/python_webex_bot-0.52-py3-none-any.whl" } ], "0.53": [ { "comment_text": "", "digests": { "md5": "31fe9294b4f947e224900b80d9c76e94", "sha256": "ab2fadca0167677255abd5dbc9de11aa1d556a63ad31a78bd5b6acaae906c4f7" }, "downloads": -1, "filename": "python_webex_bot-0.53-py3-none-any.whl", "has_sig": false, "md5_digest": "31fe9294b4f947e224900b80d9c76e94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7706, "upload_time": "2019-04-04T08:38:49", "url": "https://files.pythonhosted.org/packages/42/1c/e87b8cb41c187b6db60952432c3b9615e04d67167f0aa97edb6e2a43a03b/python_webex_bot-0.53-py3-none-any.whl" } ], "0.54": [ { "comment_text": "", "digests": { "md5": "df5445e1faab3a105018ccfc03840943", "sha256": "a12fd8a216a0c386536dcd4c530aba073d923e7cc1bfcc34edfb7bca1e7e21f8" }, "downloads": -1, "filename": "python_webex_bot-0.54-py3-none-any.whl", "has_sig": false, "md5_digest": "df5445e1faab3a105018ccfc03840943", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7716, "upload_time": "2019-04-04T09:39:24", "url": "https://files.pythonhosted.org/packages/e0/ca/47d5e5d46b664fd116d1c677674e373a9c08effc784569e0ff689d50acef/python_webex_bot-0.54-py3-none-any.whl" } ], "0.55": [ { "comment_text": "", "digests": { "md5": "fe53132f1640451352464c2d4b190d13", "sha256": "919dfde457221c45b5c1d08bfdbd1ee0c9aba3a607d4a1d8db94bf61893900e3" }, "downloads": -1, "filename": "python_webex_bot-0.55-py3-none-any.whl", "has_sig": false, "md5_digest": "fe53132f1640451352464c2d4b190d13", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7710, "upload_time": "2019-04-04T10:16:48", "url": "https://files.pythonhosted.org/packages/ca/b6/42efd187292a8293ed1b7d95bfddca45af900e90afa09a722a1c66bcc59b/python_webex_bot-0.55-py3-none-any.whl" } ], "0.56": [ { "comment_text": "", "digests": { "md5": "ae8f5453fe6b718de180c5db1ea3bbac", "sha256": "f6cfd7b4d26061acd9e72d97f8a66fba90ba7a0e4f87e2b6c796ffe489a59448" }, "downloads": -1, "filename": "python_webex_bot-0.56-py3-none-any.whl", "has_sig": false, "md5_digest": "ae8f5453fe6b718de180c5db1ea3bbac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7870, "upload_time": "2019-04-04T14:50:37", "url": "https://files.pythonhosted.org/packages/06/d3/77286a50c478d0898fb26f9e0852d51d873d2b283b09d252dd129c0ddfe5/python_webex_bot-0.56-py3-none-any.whl" } ], "0.60": [ { "comment_text": "", "digests": { "md5": "891b27a5c90fc2133aae3dd539f5ac33", "sha256": "bc1e9b786be5998063810ca6794f714f816981e90bfcaf8884a57f10d012cfcd" }, "downloads": -1, "filename": "python_webex_bot-0.60-py3-none-any.whl", "has_sig": false, "md5_digest": "891b27a5c90fc2133aae3dd539f5ac33", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9829, "upload_time": "2019-04-04T16:33:20", "url": "https://files.pythonhosted.org/packages/b5/60/38d8ca74d12ebbd524e5d6711f9f9a2234235612f3847a87dea60c6348da/python_webex_bot-0.60-py3-none-any.whl" } ], "0.61": [ { "comment_text": "", "digests": { "md5": "c2f78652c35b7ee7902c2914f3e9bd36", "sha256": "9d24c16c781366bec9b304418e85fd16dd849191a1fd4eb632812d30dd06d206" }, "downloads": -1, "filename": "python_webex_bot-0.61-py3-none-any.whl", "has_sig": false, "md5_digest": "c2f78652c35b7ee7902c2914f3e9bd36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10010, "upload_time": "2019-07-05T08:31:56", "url": "https://files.pythonhosted.org/packages/f2/76/0ecd9d6e98859f33fd8f82b212abc483a98b8e5a1d42db0dac9a8b1c13e0/python_webex_bot-0.61-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8857a6fa651fdc6ab42b62b2067fdb28", "sha256": "b0bf6ad1d6ca1a54b2d539baa8f1d50719b675c01f0ef4d67f6818e938ac14b6" }, "downloads": -1, "filename": "python_webex_bot-0.61.tar.gz", "has_sig": false, "md5_digest": "8857a6fa651fdc6ab42b62b2067fdb28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7816, "upload_time": "2019-07-05T08:31:58", "url": "https://files.pythonhosted.org/packages/07/29/74ab48acf4a9285d6601f97fa4950cf081a6325a5cf3ac23a90c02daab37/python_webex_bot-0.61.tar.gz" } ], "0.62": [ { "comment_text": "", "digests": { "md5": "2149a54bcab8ed637ee47269a7a03bc3", "sha256": "03f70e5102536570b87efe3b9475c67189bffb297f381b15e49a7ddcd7f484e5" }, "downloads": -1, "filename": "python_webex_bot-0.62.tar.gz", "has_sig": false, "md5_digest": "2149a54bcab8ed637ee47269a7a03bc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7738, "upload_time": "2019-07-05T08:42:04", "url": "https://files.pythonhosted.org/packages/14/77/55a045144f6672ada0b3221a36b52fd8bed41135c64b8746e11b3fc0e39c/python_webex_bot-0.62.tar.gz" } ], "0.63": [ { "comment_text": "", "digests": { "md5": "e18570d0a3a5aa00c23e9824803f349c", "sha256": "5427b7ad5b25a9609a7838f9abd7b358cd028ca3757b9d669c10bbd87db4e03b" }, "downloads": -1, "filename": "python_webex_bot-0.63.tar.gz", "has_sig": false, "md5_digest": "e18570d0a3a5aa00c23e9824803f349c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7736, "upload_time": "2019-07-05T08:43:57", "url": "https://files.pythonhosted.org/packages/1b/1c/61aaefab59a79df68c4a2039dbecc3ce26c6af9797baa6244537e1f0b4dc/python_webex_bot-0.63.tar.gz" } ], "0.64": [ { "comment_text": "", "digests": { "md5": "7b419fa28ee07ceda07f2c7429f85b40", "sha256": "fb733cbd12e416c30fd03c558322278445d9fde5c8e323a6bc2f7d7d6b1aa447" }, "downloads": -1, "filename": "python_webex_bot-0.64-py3-none-any.whl", "has_sig": false, "md5_digest": "7b419fa28ee07ceda07f2c7429f85b40", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9935, "upload_time": "2019-07-05T08:47:22", "url": "https://files.pythonhosted.org/packages/93/9e/349e833b10108624ef9a0f230b10c8a59bc8f93be22cc0ced7f88c94e99c/python_webex_bot-0.64-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0aee35bb5c0c3f0bd0b8aef16c6a8692", "sha256": "5f3790e02f232198378d54901c83af0c625bf36571cc618f727f60cec203fe0f" }, "downloads": -1, "filename": "python_webex_bot-0.64.tar.gz", "has_sig": false, "md5_digest": "0aee35bb5c0c3f0bd0b8aef16c6a8692", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7735, "upload_time": "2019-07-05T08:47:24", "url": "https://files.pythonhosted.org/packages/12/4a/4464624ba3185e80014be60b8937cb421d35cefffe540802015617c5d2c6/python_webex_bot-0.64.tar.gz" } ], "0.70": [ { "comment_text": "", "digests": { "md5": "a288b4b7b44d1b3ef70b1726f69a3dcd", "sha256": "fec201da1e6a3d455e6920cf783ff93edc3d8a8dcbcff60d75bbf247446de818" }, "downloads": -1, "filename": "python_webex_bot-0.70-py3-none-any.whl", "has_sig": false, "md5_digest": "a288b4b7b44d1b3ef70b1726f69a3dcd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9935, "upload_time": "2019-07-05T08:51:08", "url": "https://files.pythonhosted.org/packages/00/64/d113bdf724835f4f147a5527d71c6de47d94e7ec075bff75d807c5ca0665/python_webex_bot-0.70-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a288b4b7b44d1b3ef70b1726f69a3dcd", "sha256": "fec201da1e6a3d455e6920cf783ff93edc3d8a8dcbcff60d75bbf247446de818" }, "downloads": -1, "filename": "python_webex_bot-0.70-py3-none-any.whl", "has_sig": false, "md5_digest": "a288b4b7b44d1b3ef70b1726f69a3dcd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9935, "upload_time": "2019-07-05T08:51:08", "url": "https://files.pythonhosted.org/packages/00/64/d113bdf724835f4f147a5527d71c6de47d94e7ec075bff75d807c5ca0665/python_webex_bot-0.70-py3-none-any.whl" } ] }