A small package to simplify the creation of Google Chat Bots
Project description
Google Chat
A small package to simplify the creation of Google Chat Bots
Examples
Text Messages
To send a simple text message to a Google Chat webhook
from googlechatbot import GoogleChatBot
webhook_url = "https://chat.googleapis.com/v1/..."
bot = GoogleChatBot(webhook_url)
bot.send_text_message("test message")
Cards
To simplify card creation there is a builder
from googlechatbot import CardBuilder, GoogleChatBot
webhook_url = "https://chat.googleapis.com/v1/..."
bot = GoogleChatBot(webhook_url)
builder = CardBuilder()
builder.add_header("Title", "Subtitle", "https://example.com/images/image.png")
builder.create_section("My section")
builder.add_keyvalue_widget("Key","Value","STAR")
card = builder.build()
resp = bot.send_card_message(card)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
googlechatbot-1.1.0.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for googlechatbot-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9bf43e557a7347c32caa3ada77a26ffce7bda312d1048712a97baccb8503e78 |
|
MD5 | 92b62fefc1b6c39f46c62448de8bc524 |
|
BLAKE2b-256 | fbb5af8f38d4828df4935bd541e9e1af016ae0dd252de430dffcde7d2df2a0a1 |