A collection of Twyla chat message templates
Project description
Twyla Chat Templates
A collection of Twyla chat message templates
Installation
poetry install twyla-chat-templates
Usage
Quick reply buttons
quick_replies = QuickReplies(text="Which kind of chocolate do you prefer?")
# To add up to ten quick reply buttons:
quick_replies.add(QuickReply(title="Dark", payload="dark_chocolate"))
Postback and URL Buttons
buttons = Buttons(text="What is your favourite type of pizza?")
# To add up to three buttons:
buttons.add(
PostBackButton(title="Margherita", payload="x_Margherita_oaWVAeasEK_x"),
UrlButton(title="Hawaii", url="https://google.com"),
)
Generic Template
element = GenericElement(
title="Cheesecake",
subtitle="Cake with cheese",
image_url="https://cake.com/image.jpg",
action_url="https://cake.com",
buttons=[
PostBackButton(
title="I want Cheesecake", payload="x_I_want_Cheesecake_gkvMPBXXxO_x"
),
UrlButton(title="Cheesecake, please", url="https://cheesecakeplease.com"),
],
)
template = GenericTemplate(elements=[element])
Carousel Template
# To Create a vertically scrollable carousel, add up to 10 elements to the generic template:
carousel = GenericTemplate(elements=[e1, e2, e3])
Image Template
image = ImageTemplate(url="https://pictures.com/picture.jpg")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file twyla-chat-templates-0.1.0.tar.gz.
File metadata
- Download URL: twyla-chat-templates-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.4 Linux/5.0.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7926591b952d497855e46642635d80f6acc5411484abbb379169ae1815d92f6c
|
|
| MD5 |
2486f927baa2851aabee25beae669a32
|
|
| BLAKE2b-256 |
fa9e7359989a48da520f78b5861ddf1edccff8440c3ed873a510b5ac9b0ba971
|
File details
Details for the file twyla_chat_templates-0.1.0-py3-none-any.whl.
File metadata
- Download URL: twyla_chat_templates-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.17 CPython/3.7.4 Linux/5.0.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be359b9449fa5642370c7a23545770b9672372427f436a9f91f965a0ace858d7
|
|
| MD5 |
7592bf103e7239efe31f09c0fb94cc09
|
|
| BLAKE2b-256 |
662d9ed452d206d522e89c287f11f048b5a5d17a92f091075140789b4de49a25
|