Skip to main content

A simple library to send Telegram notifition when your code is completed .

Project description

Telegram Notifier - Prakhar

telegram-notifier-prakhar is a Python package designed to send notifications via Telegram. This is particularly useful for notifying users about the completion of long-running processes in their code.

Features

  • Easy to integrate with any Python script.
  • Customizable message content.
  • Uses Telegram Bot to send notifications.

Prerequisites

Before you can use this package, you need to set up a Telegram Bot. Follow these steps to get started:

Step 1: Create a Telegram Bot

  1. Open Telegram app and search for "BotFather".
  2. Start a chat with BotFather and send /newbot.
  3. Follow the instructions to create your bot. You will receive a token for accessing your bot via HTTP API.

Step 2: Get Your Chat ID

  1. Start a chat with your newly created bot or add it to a group.
  2. Send a message to the bot or in the group.
  3. Visit https://api.telegram.org/bot<YourBOTToken>/getUpdates in your web browser.
  4. Look for "chat":{"id":<number>} in the response. This number is your chat ID.

Installation

Install the package via pip:

pip install telegram-notifier-prakhar

Usage

Here is a simple example of how to use the telegram-notifier-prakhar in your Python script:

from telegram_notifier import send_telegram_message

bot_token = 'your_bot_token'  # Replace with your bot token
chat_id = 'your_chat_id'  # Replace with your chat id

# Send a custom message
send_telegram_message(bot_token, chat_id, "Your script has finished running.")

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

telegram_notifier_prakhar-0.2.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

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

telegram_notifier_prakhar-0.2-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file telegram_notifier_prakhar-0.2.tar.gz.

File metadata

  • Download URL: telegram_notifier_prakhar-0.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for telegram_notifier_prakhar-0.2.tar.gz
Algorithm Hash digest
SHA256 33db1a58d89506a2aaecae8c6571f958c5180c5cdaee04b91268b15caf9a975b
MD5 fc0e25505508353a99cf6598778c92fb
BLAKE2b-256 f37c4a0d3571431a1220a677a04ab06003fe65bfcd3916769c5ef2525dd4449f

See more details on using hashes here.

File details

Details for the file telegram_notifier_prakhar-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for telegram_notifier_prakhar-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25045ace0037c2a7ac44727f0808cc0c17132dcea7e28e4f0d2dea723d7e9e7c
MD5 2c162384bf9c8611bbea3c283af84121
BLAKE2b-256 0024a4b07db3f14d1d9f71946052005dcddc018b450415be01740bfdf174bd79

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