Skip to main content

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.

Release files for py-telegram-sender 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-telegram-sender 0.1.3
File Size Uploaded
py_telegram_sender-0.1.3.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-telegram-sender 0.1.3
File Interpreter ABI Platform
py_telegram_sender-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / py_telegram_sender-0.1.3.tar.gz

Download URL py_telegram_sender-0.1.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
79726e63b620c9425e01538c70af0fde3fa4969c8a1addb0d4e3d0517d634533
BLAKE2b-256 checksum
How to use checksums
0556095b5c559a2c73e0d733a29ee3315ec5c364f7f2404c170e8471f9478938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.2

Release files / py_telegram_sender-0.1.3-py3-none-any.whl

Download URL py_telegram_sender-0.1.3-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
024455b6c69539dd0b7452b4ab245aad827095680815d75719e625efbfd7953f
BLAKE2b-256 checksum
How to use checksums
14c558a0cc81f8907183071fcd02daea1e3147e5560266a85d3af732271cb081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page