Skip to main content

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.2.3.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

googlechatbot-1.2.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file googlechatbot-1.2.3.tar.gz.

File metadata

  • Download URL: googlechatbot-1.2.3.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for googlechatbot-1.2.3.tar.gz
Algorithm Hash digest
SHA256 4c402651525ac730c0aa1a058ebc5e69bac6fdbe84c6467799c7fdaa732bb22a
MD5 436e1cfbfba09b3d67506727e2c2d6af
BLAKE2b-256 cb06aa9a70bc42bba8dcb020c58e6c0273cc2b26e4250f28dfa6e50375668d93

See more details on using hashes here.

File details

Details for the file googlechatbot-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: googlechatbot-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for googlechatbot-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 72a5c298586bcbc7b220c54e3fdf221ad54a6cc7c48c9fa16dbfc7a3e4b898b6
MD5 bfcc7771e5ffa552490fe79fa166670e
BLAKE2b-256 2a82c689736e961da972c404fb2d001a8c3d802456e8ba4933ed96f79a866b27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page