A Python package to send messages and images to Telegram groups using 'requests' package only.
Project description
Telegramy
Telegramy is a lightweight Python package designed for sending messages and images to Telegram groups with ease. This package provides a simple interface for interacting with Telegram, relying only on the requests library to communicate with Telegram's Bot API.
Features
- Send Text Messages: Easily send text messages to Telegram groups.
- Send Images: Quickly share images with group members.
- Lightweight: No unnecessary dependencies—built with only
requests. - Simple Configuration: Set up using your Telegram bot token and group chat ID.
Installation
You can install Telegramy via pip:
pip install telegramy
Creating a Telegram Bot
- Open Telegram and search for @BotFather.
- Start a chat with @BotFather and send the command
/newbot. - Follow the on-screen instructions to:
- Name your bot.
- Choose a unique username for your bot.
- Once the bot is created, @BotFather will provide you with a token to access the Telegram HTTP API.
- Copy the token and use it as the
tokenparameter when initializing theSenderclass in Telegramy.
Retrieving a Chat ID
- Log in to Telegram Web in your browser.
- Open the chat you want to retrieve the ID for.
- Look at the URL in your browser’s address bar. It should look something like this:
https://web.telegram.org/a/#-132132132. - Extract the part after the
#symbol (e.g.,-132132132). - Replace the prefix
#-with-100. For example:
#-132132132→-100132132132. - Use the final result (e.g.,
-100132132132) as your chat ID when sending messages with your bot.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telegramy-0.0.2.tar.gz.
File metadata
- Download URL: telegramy-0.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f6160a6919c02eb565a4af609c1804beccf9c6065c258c2cbefdd7dab813587
|
|
| MD5 |
84c38a91a4e3afe307eab834a2a13a47
|
|
| BLAKE2b-256 |
f3343a0a668d30fb767038d9f129b52df3045a371d7148e684176b5325aafb06
|
File details
Details for the file telegramy-0.0.2-py3-none-any.whl.
File metadata
- Download URL: telegramy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f678c268822a1b86e44e19283a85f9aaf376683c69519d7aa1fbb4f52a3f54bc
|
|
| MD5 |
9d2c875f2fd6d8df73a50c4a35296cae
|
|
| BLAKE2b-256 |
dd809ece504124403987606eb545b538e05e842cd55c727a0bae3234938ed564
|