A simple library for sending messages and files via Telegram
Project description
py-telegram-sender
py-telegram-sender is a simple and convenient Python library for sending messages and files via a Telegram bot.
Installation
You can install py-telegram-sender using pip:
pip install py-telegram-sender
Usage
Basic Usage
from py_telegram_sender import TelegramSender
# Create a TelegramSender instance
sender = TelegramSender('YOUR_BOT_TOKEN', 'YOUR_CHAT_ID')
# Send a text message
sender.send_msg('Hello, world!')
# Send a file
sender.send_file('Here is a document', '/path/to/your/file.txt')
Using Backward Compatibility Functions
from py_telegram_sender import set_credentials, send_msg, send_file
# Set credentials
set_credentials('YOUR_BOT_TOKEN', 'YOUR_CHAT_ID')
# Send a text message
send_msg('Hello, world!')
# Send a file
send_file('Here is a document', '/path/to/your/file.txt')
Requirements
- Python 3.6+
- requests
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
We welcome contributions to the project! Please feel free to create an issue or pull request.
Contact
If you have any questions or suggestions, please create an issue in this repository.
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 py_telegram_sender-0.1.3.tar.gz.
File metadata
- Download URL: py_telegram_sender-0.1.3.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79726e63b620c9425e01538c70af0fde3fa4969c8a1addb0d4e3d0517d634533
|
|
| MD5 |
1c584f4cdeebcf7c76234c0e4395c070
|
|
| BLAKE2b-256 |
0556095b5c559a2c73e0d733a29ee3315ec5c364f7f2404c170e8471f9478938
|
File details
Details for the file py_telegram_sender-0.1.3-py3-none-any.whl.
File metadata
- Download URL: py_telegram_sender-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
024455b6c69539dd0b7452b4ab245aad827095680815d75719e625efbfd7953f
|
|
| MD5 |
dbadf6229527ed138f42766e2e6f396e
|
|
| BLAKE2b-256 |
14c558a0cc81f8907183071fcd02daea1e3147e5560266a85d3af732271cb081
|