Skip to main content

Telegram logging utility for Python

Project description

📬 TellPy — Telegram Logging for Python

PyPI version Python versions

TellPy is a lightweight Python library for sending logs and notifications to a Telegram chat using a bot.
It supports different log levels like info, warning, error, and general-purpose logs.


🚀 Features

  • 📡 Send messages to Telegram directly from Python
  • ✅ Supports info, warn, error, and log levels
  • 🧩 Simple interface for integration with any app or script
  • 🛠️ Built on top of requests and python-dotenv

📦 Installation

Install via PyPI:

pip install tell-py

🔧 Basic Usage

from tell_py import Tell

tell = Tell(
    bot_token="YOUR_BOT_TOKEN",
    chat_id="YOUR_CHAT_ID"
)

tell.info("Everything is working fine.")
tell.warn("This might be a warning.")
tell.error("An error occurred!")
tell.log("Just a normal log.")

How to Get Your Bot Token and Chat ID

  1. Create a Bot: Open Telegram and search for the BotFather. Use the /newbot command to create a new bot. Follow the instructions to get your bot token.
  2. Get Your Chat ID: Start a chat with your bot and send any message. Then, use the following URL to get your chat ID:
    https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
    
  3. Response: Look for the chat object in the JSON response. The id field is your chat ID.

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

tell_py-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

tell_py-0.1.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file tell_py-0.1.1.tar.gz.

File metadata

  • Download URL: tell_py-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tell_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a603b0a828edeba7b457b6416f285b413f642aefaafcbc0bbc9a2ae0d11bcb70
MD5 cf6e907653406f13bb6e583f2ccd00a9
BLAKE2b-256 c37de4054427c350657d88f389071dc8ef828b209ecca8665c7c8a6043e0b362

See more details on using hashes here.

Provenance

The following attestation bundles were made for tell_py-0.1.1.tar.gz:

Publisher: python-publish.yml on Rompni/tell-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tell_py-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tell_py-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tell_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 266d3295cb9bb55a26d9d78f95b8adada2e4d919f0501ff28b58f5b8bea22734
MD5 3fd30bfa7831e29408769b9484f47a20
BLAKE2b-256 26b2b11447e86ca95cdb7e24577b4f5a0972ea4a8208eb81c5f37cd7b906809e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tell_py-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on Rompni/tell-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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