Skip to main content

Simple alert helpers for Slack and Telegram using requests.

Project description

toolsalert

Simple alert helpers for Slack and Telegram, implemented using requests.

Install

pip install toolsalert

Usage

from toolsalert import AlertSlack, AlertTelegram

# Slack
slack_alert = AlertSlack(slack_token, slack_channel, bot_name, bot_icon)
slack_alert.send("Hello from Slack")

# Telegram
tg = AlertTelegram(api_token="123456:ABCDEF...", chat_id="123456789")
tg.send("Hello from Telegram")
tg.send_no_preview("<b>HTML</b> message without link preview")
tg.send_photo("https://example.com/some_image.jpg")

Notes

  • Do not hardcode real tokens/webhook URLs in code committed to git.
  • Use environment variables or a secret manager for credentials.

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

toolsalert-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

toolsalert-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file toolsalert-0.1.0.tar.gz.

File metadata

  • Download URL: toolsalert-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for toolsalert-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d3265b2278b8994274dba3fa3010502a521f2f7b2f9437c89eea054a18e0ce9
MD5 cd98bc62004af6242a3435901713c109
BLAKE2b-256 5dec5a6fbe98d8a0513779700d152b9ab15fed93b5d2aee143e46a62cc1d5c5f

See more details on using hashes here.

File details

Details for the file toolsalert-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: toolsalert-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for toolsalert-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc9ee59e3123815ca649056bcc30bf7361df4f2571ce61fec7fac755f40f4a6
MD5 5a6ed4f323fc4edc35bf27b420fb9f46
BLAKE2b-256 66a1d7f3114b4dbcf7f2ee03c1f1d206d4e9341aaa80aae0fd4f67b5a8984899

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