{ "info": { "author": "Twyla Engineering", "author_email": "software@twyla.ai", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![image](https://img.shields.io/pypi/v/twyla-chat-templates.svg)](https://pypi.org/project/twyla-chat-templates/)\n[![image](https://img.shields.io/pypi/l/twyla-chat-templates.svg)](https://pypi.org/project/twyla-chat-templates/)\n[![image](https://img.shields.io/pypi/pyversions/twyla-chat-templates.svg)](https://pypi.org/project/twyla-chat-templates/)\n[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![](https://github.com/twyla-ai/twyla-chat-templates/workflows/Main%20Workflow/badge.svg)](https://github.com/twyla-ai/twyla-chat-templates/actions)\n\n# Twyla Chat Templates\nA collection of Twyla chat message templates\n\n## Installation\n`poetry install twyla-chat-templates`\n\n## Usage\n\n##### Quick reply buttons\n```python\nquick_replies = QuickReplies(text=\"Which kind of chocolate do you prefer?\")\n\n# To add up to ten quick reply buttons:\nquick_replies.add(QuickReply(title=\"Dark\", payload=\"dark_chocolate\"))\n```\n\n##### Postback and URL Buttons\n```python\nbuttons = Buttons(text=\"What is your favourite type of pizza?\")\n\n# To add up to three buttons:\nbuttons.add(\n PostBackButton(title=\"Margherita\", payload=\"x_Margherita_oaWVAeasEK_x\"),\n UrlButton(title=\"Hawaii\", url=\"https://google.com\"),\n )\n```\n##### Generic Template\n```python\nelement = GenericElement(\n title=\"Cheesecake\",\n subtitle=\"Cake with cheese\",\n image_url=\"https://cake.com/image.jpg\",\n action_url=\"https://cake.com\",\n buttons=[\n PostBackButton(\n title=\"I want Cheesecake\", payload=\"x_I_want_Cheesecake_gkvMPBXXxO_x\"\n ),\n UrlButton(title=\"Cheesecake, please\", url=\"https://cheesecakeplease.com\"),\n ],\n )\ntemplate = GenericTemplate(elements=[element])\n```\n##### Carousel Template\n```python\n# To Create a vertically scrollable carousel, add up to 10 elements to the generic template: \ncarousel = GenericTemplate(elements=[e1, e2, e3])\n```\n\n##### Image Template \n```python\nimage = ImageTemplate(url=\"https://pictures.com/picture.jpg\")\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/twyla-ai/twyla-chat-templates", "keywords": "", "license": "MIT", "maintainer": "Twyla Engineering", "maintainer_email": "software@twyla.ai", "name": "twyla-chat-templates", "package_url": "https://pypi.org/project/twyla-chat-templates/", "platform": "", "project_url": "https://pypi.org/project/twyla-chat-templates/", "project_urls": { "Homepage": "https://github.com/twyla-ai/twyla-chat-templates", "Repository": "https://github.com/twyla-ai/twyla-chat-templates" }, "release_url": "https://pypi.org/project/twyla-chat-templates/0.1.0/", "requires_dist": [ "dataclasses (>=0.6,<0.7); python_version >= \"3.6\" and python_version < \"3.7\"" ], "requires_python": ">=3.6,<4.0", "summary": "A collection of Twyla chat message templates", "version": "0.1.0" }, "last_serial": 5978103, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7592bf103e7239efe31f09c0fb94cc09", "sha256": "be359b9449fa5642370c7a23545770b9672372427f436a9f91f965a0ace858d7" }, "downloads": -1, "filename": "twyla_chat_templates-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7592bf103e7239efe31f09c0fb94cc09", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6103, "upload_time": "2019-10-15T15:52:14", "url": "https://files.pythonhosted.org/packages/66/2d/9ed452d206d522e89c287f11f048b5a5d17a92f091075140789b4de49a25/twyla_chat_templates-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2486f927baa2851aabee25beae669a32", "sha256": "7926591b952d497855e46642635d80f6acc5411484abbb379169ae1815d92f6c" }, "downloads": -1, "filename": "twyla-chat-templates-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2486f927baa2851aabee25beae669a32", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4211, "upload_time": "2019-10-15T15:51:59", "url": "https://files.pythonhosted.org/packages/fa/9e/7359989a48da520f78b5861ddf1edccff8440c3ed873a510b5ac9b0ba971/twyla-chat-templates-0.1.0.tar.gz" } ], "0.1.0a0": [ { "comment_text": "", "digests": { "md5": "c4a23908e4dbb23b50baaee2254c6b2a", "sha256": "97a87a7830d115960e364dfabf97ec7e4d49ff863e2a77f677a745eeb78e0b6d" }, "downloads": -1, "filename": "twyla_chat_templates-0.1.0a0-py3-none-any.whl", "has_sig": false, "md5_digest": "c4a23908e4dbb23b50baaee2254c6b2a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6123, "upload_time": "2019-10-15T15:39:07", "url": "https://files.pythonhosted.org/packages/47/b5/7c419b5e58f6d5369d435b5c5166c1ba55d2c82e76d0ef2604e2e76b26c7/twyla_chat_templates-0.1.0a0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0766711ea67e412b8add28034711a987", "sha256": "3b3f37800f165e26f6c4e8fd2757afd9fe4f0267ba3cf3ffe46a07004d2de94b" }, "downloads": -1, "filename": "twyla-chat-templates-0.1.0a0.tar.gz", "has_sig": false, "md5_digest": "0766711ea67e412b8add28034711a987", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4333, "upload_time": "2019-10-15T15:38:23", "url": "https://files.pythonhosted.org/packages/97/d8/298f9f9ceb7a19725fa821b2c1e57f5332d36493e11c20a064b0253f5b0d/twyla-chat-templates-0.1.0a0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7592bf103e7239efe31f09c0fb94cc09", "sha256": "be359b9449fa5642370c7a23545770b9672372427f436a9f91f965a0ace858d7" }, "downloads": -1, "filename": "twyla_chat_templates-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7592bf103e7239efe31f09c0fb94cc09", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 6103, "upload_time": "2019-10-15T15:52:14", "url": "https://files.pythonhosted.org/packages/66/2d/9ed452d206d522e89c287f11f048b5a5d17a92f091075140789b4de49a25/twyla_chat_templates-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2486f927baa2851aabee25beae669a32", "sha256": "7926591b952d497855e46642635d80f6acc5411484abbb379169ae1815d92f6c" }, "downloads": -1, "filename": "twyla-chat-templates-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2486f927baa2851aabee25beae669a32", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4211, "upload_time": "2019-10-15T15:51:59", "url": "https://files.pythonhosted.org/packages/fa/9e/7359989a48da520f78b5861ddf1edccff8440c3ed873a510b5ac9b0ba971/twyla-chat-templates-0.1.0.tar.gz" } ] }