{ "info": { "author": "Rasa Technologies GmbH", "author_email": "hi@rasa.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "# Botsociety Python Client\n[![Build Status](https://travis-ci.com/RasaHQ/botsociety-py-client.svg?token=dD3o9yxyCw5PCTNpznf4&branch=master)](https://travis-ci.com/RasaHQ/botsociety-py-client)\n[![PyPI version](https://badge.fury.io/py/botsociety-client.svg)](https://badge.fury.io/py/botsociety-client)\n\nConnects to the botsociety API and provides an easy to use python API\n\nThis implementation is inspired by the official\n[client for nodejs](https://github.com/botsociety/node-client).\n\n## Installation\n```\npip install botsociety-client\n```\n\n## Usage example\n\n```python\nfrom botsociety import BotSocietyClient\n\nclient = BotSocietyClient(user_id=\"USER_ID\",\n api_key=\"API_KEY\")\n```\n\nYou can find the values for the `USER_ID` and the `API_KEY` on your [Botsociety Profile page](https://app.botsociety.io/#/account)\n\n### auth()\nTest the authentication with Botsociety.\n\n```python\nclient.auth()\n```\nExample:\n```python\nIn [4]: client.auth()\nOut[4]:\n{'auth': True,\n 'info': 'You are successfully calling the API. This is just a test API to check your authentication params.'}\n```\n\n### conversations()\nRetrieve all the conversations from the account.\n\n```python\nclient.conversations()\n```\nExample:\n```python\nIn [5]: client.conversations()\nOut[5]:\n[{'_id': '5af2c33e64aefa000b21b096',\n 'channel': 'facebook',\n 'createdAt': '2018-05-09T09:45:34.860Z',\n 'name': 'testbot mockup',\n 'questions': [],\n 'selected_model': 'iphone6',\n 'selected_variant': 'white',\n 'updatedAt': '2018-05-09T12:06:51.459Z'},\n {'_id': '5af2e40964aefa000b21e108',\n 'channel': 'slack',\n 'createdAt': '2018-05-09T12:05:29.185Z',\n 'name': 'slack-test mockup',\n 'questions': [],\n 'selected_model': 'iphone6',\n 'selected_variant': 'white',\n 'updatedAt': '2018-05-09T12:05:31.593Z'}]\n```\n\n### conversation('conversation_id')\nRetrieve all the information about a single conversation (e.g. includes all messages).\n\n```python\nclient.conversation(\"5af2c33e64aefa000b21b096\")\n```\n\nExample:\n```python\nIn [6]: client.conversation(\"5af2c33e64aefa000b21b096\")\nOut[6]:\n{'_id': '5af2c33e64aefa000b21b096',\n 'channel': 'facebook',\n 'createdAt': '2018-05-09T09:45:34.860Z',\n 'messages': [{'_belongs_to_socket_id': None,\n '_conversation': '5af2c33e64aefa000b21b096',\n '_id': '5af2c34164aefa000b21b097',\n '_sender': '5af2c34164aefa000b21b09c',\n 'alternativeChoices': [],\n 'attachments': [{'choices': [], 'labels': [], 'size': 'horizontal'}],\n 'audio_duration': None,\n 'audio_url': None,\n 'audio_voice': None,\n 'choices': [],\n 'createdAt': '2018-05-09T09:45:37.195Z',\n 'intent': 'greet',\n 'is_next_message_linked': False,\n 'next_alternative': None,\n 'next_message': '5af2c34164aefa000b21b098',\n 'prev_alternative': None,\n 'prev_linked_messages': [],\n 'prev_message': None,\n 'progressiveId': 1,\n 'show_time': 1500,\n 'side': False,\n 'text': 'hello',\n 'text_with_variables': 'hello',\n 'type': 'text',\n 'updatedAt': '2018-05-09T09:49:34.469Z'}],\n 'name': 'testbot mockup',\n 'options': {'backgroundColor': '#FFFFFF',\n 'menu': [{'id': '0f13b412-1b61-337b-4486-3278bb657443',\n 'messages': [],\n 'nodes': [{'id': '6308000f-8a85-a546-adc8-a6cbc96c5fb3',\n 'messages': [],\n 'nodes': [],\n 'title': 'Contact us'}],\n 'title': 'Help'}],\n 'showKeyboard': True,\n 'showTypingIndicators': True},\n 'questions': [],\n 'rtl': False,\n 'selected_model': 'iphone6',\n 'selected_variant': 'white',\n 'set_welcome': False,\n 'updatedAt': '2018-05-09T12:06:51.459Z',\n 'ws_fans': '0',\n 'ws_page_category': '2301',\n 'ws_text': 'Hi, click the button below to start!'}\n```\n\n### message('message_id', 'conversation_id')\nRetrieve all the information about a single message of a conversation.\n\n```python\nclient.message(\"5af2c34164aefa000b21b097\", \"5af2c33e64aefa000b21b096\")\n```\n\nExample:\n```python\nIn [7]: client.message(\"5af2c34164aefa000b21b097\", \"5af2c33e64aefa000b21b096\")\nOut[7]:\n{'_belongs_to_socket_id': None,\n '_conversation': '5af2c33e64aefa000b21b096',\n '_id': '5af2c34164aefa000b21b097',\n '_sender': '5af2c34164aefa000b21b09c',\n 'alternativeChoices': [],\n 'attachments': [{'choices': [], 'labels': [], 'size': 'horizontal'}],\n 'audio_duration': None,\n 'audio_url': None,\n 'audio_voice': None,\n 'choices': [],\n 'createdAt': '2018-05-09T09:45:37.195Z',\n 'intent': 'greet',\n 'is_next_message_linked': False,\n 'next_alternative': None,\n 'next_message': '5af2c34164aefa000b21b098',\n 'prev_alternative': None,\n 'prev_linked_messages': [],\n 'prev_message': None,\n 'progressiveId': 1,\n 'show_time': 1500,\n 'side': False,\n 'text': 'hello',\n 'text_with_variables': 'hello',\n 'type': 'text',\n 'updatedAt': '2018-05-09T09:49:34.469Z'}\n```\n\n### variables('conversation_id')\nRetrieve all variables of a conversation.\n\n```python\nclient.variables(\"5af2c33e64aefa000b21b096\")\n```\n\nExample:\n```python\nIn [8]: client.variables(\"5af2c33e64aefa000b21b096\")\nOut[8]: {'cuisine': {'values': ['chinese']}}\n```\n\n## Advanced Usage\n\n### Specifying your own botsociety API server\nIf you happen to run your own botsociety API server, there\nis a way to specify its url:\n\n```python\nfrom botsociety import BotSocietyClient\n\nclient = BotSocietyClient(user_id=\"USER_ID\",\n api_key=\"API_KEY\",\n api_url=\"http://yourapi.com\")\n```\n\n## Changelog\n\n### 1.1.0 - 20.08.18\n*added*:\n- allow user to specify version / url of botsociety API \n\n### 1.0.0 - 14.05.18\n\n*added*:\n- initial version released\n- feature complete with respect to node js client library\n\n## License\n\nLicensed under the Apache License, Version 2.0. Copyright 2018 Rasa Technologies GmbH. [Copy of the license](LICENSE).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/RasaHQ/botsociety-py-client/archive/1.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://rasa.com", "keywords": "botsociety,bots,dialogue", "license": "Apache 2.0", "maintainer": "Tom Bocklisch", "maintainer_email": "tom@rasa.com", "name": "botsociety-client", "package_url": "https://pypi.org/project/botsociety-client/", "platform": "", "project_url": "https://pypi.org/project/botsociety-client/", "project_urls": { "Bug Reports": "https://github.com/RasaHQ/botsociety-py-client/issues", "Download": "https://github.com/RasaHQ/botsociety-py-client/archive/1.1.0.tar.gz", "Homepage": "https://rasa.com", "Source": "https://github.com/RasaHQ/botsociety-py-client" }, "release_url": "https://pypi.org/project/botsociety-client/1.1.0/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Client to connect to Botsociety", "version": "1.1.0" }, "last_serial": 4188294, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "5f0d29b027cde213f4c3b7adc0eb72f2", "sha256": "b7ba63175fe519c682a71c07a85baf237c09792b6c43f1d3f24caaba215736d5" }, "downloads": -1, "filename": "botsociety_client-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "5f0d29b027cde213f4c3b7adc0eb72f2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4109, "upload_time": "2018-05-14T08:36:15", "url": "https://files.pythonhosted.org/packages/58/32/d5700be86a4cfdf4276d862b9c11e2e420134145b1ab5512ea9d5c62a2e2/botsociety_client-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "936800055c31fc67d6148e349162dd1d", "sha256": "cac806ca3186d1717e134b92f437d2e703058e63f4d4e99f35133481309eaf77" }, "downloads": -1, "filename": "botsociety-client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "936800055c31fc67d6148e349162dd1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4383, "upload_time": "2018-05-14T08:36:16", "url": "https://files.pythonhosted.org/packages/d3/ed/a55cd9e20e17384510dc43511be620bf7b10cfb1e749fd59943807bc8717/botsociety-client-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "c50c84befd7977a103a18bc66a305247", "sha256": "b259538a1395340bc014dcfa8a7a7b71635adad0f3152c0db7d91b4a2578e386" }, "downloads": -1, "filename": "botsociety_client-1.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c50c84befd7977a103a18bc66a305247", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4357, "upload_time": "2018-08-20T13:04:11", "url": "https://files.pythonhosted.org/packages/2c/f9/fbb05696ad266bd51159afb364e5b0ebb99fbcac8474f7e5ea2ab646a8d7/botsociety_client-1.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddca2a2191214f68241f86152c125a18", "sha256": "e37f85f28dc7926e76a22a52ae995177cfef8a90533b99d43f9081e3b0a56676" }, "downloads": -1, "filename": "botsociety-client-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ddca2a2191214f68241f86152c125a18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4668, "upload_time": "2018-08-20T13:04:13", "url": "https://files.pythonhosted.org/packages/60/53/524835a15c726bd35300c8bfb366038b94f3ef9bc2836a14f22d6d0a153a/botsociety-client-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c50c84befd7977a103a18bc66a305247", "sha256": "b259538a1395340bc014dcfa8a7a7b71635adad0f3152c0db7d91b4a2578e386" }, "downloads": -1, "filename": "botsociety_client-1.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c50c84befd7977a103a18bc66a305247", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4357, "upload_time": "2018-08-20T13:04:11", "url": "https://files.pythonhosted.org/packages/2c/f9/fbb05696ad266bd51159afb364e5b0ebb99fbcac8474f7e5ea2ab646a8d7/botsociety_client-1.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddca2a2191214f68241f86152c125a18", "sha256": "e37f85f28dc7926e76a22a52ae995177cfef8a90533b99d43f9081e3b0a56676" }, "downloads": -1, "filename": "botsociety-client-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ddca2a2191214f68241f86152c125a18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4668, "upload_time": "2018-08-20T13:04:13", "url": "https://files.pythonhosted.org/packages/60/53/524835a15c726bd35300c8bfb366038b94f3ef9bc2836a14f22d6d0a153a/botsociety-client-1.1.0.tar.gz" } ] }