Metadata-Version: 2.1
Name: telegram-bot-reporter
Version: 0.1.11
Summary: Library for sending messages and files using a Telegram bot.
Home-page: https://pypi.org/project/telegram-bot-reporter/
License: MIT
Author: deskent
Author-email: battenetciz@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Project-URL: Repository, https://github.com/Deskent/bot_reporter
Description-Content-Type: text/markdown

### Stack:

- [x] <a href="https://www.python.org/"><img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-plain.svg" alt="python" width="15" height="15"/>
  Python 3.10+ <br/></a>
- [x] <a href="https://github.com/projectdiscovery/httpx"><img src="https://user-images.githubusercontent.com/8293321/135731750-4c1d38b1-bd2a-40f9-88e9-3c4b9f6da378.png" alt="httpx" width="15" height="15"/>
  Httpx 0.27.0+ <br/>

### Installation

    pip install telegram-bot-reporter

### Usage Sync

    from telegram_bot_reporter import Bot

    bot = Bot(bot_token=TELEBOT_TOKEN, chat_id=CHAT_ID)

    # Send message
    bot.send_message('Hello, world')

    # Send file
    temp_file = Path('test.txt')
    with open(temp_file, mode='w', encoding='utf-8') as f:
        f.write('Test message')
    bot.send_document(temp_file)

    # Send long message (more than 4000 symbols)
    bot.send_message('Very long message over 4000 symbols', split_message=True)

### Usage Async

    from telegram_bot_reporter import AsyncBot

    bot = AsyncBot(bot_token=TELEBOT_TOKEN, chat_id=CHAT_ID)

    await bot.send_message('Hello, world')

    # Send file
    temp_file = Path('test.txt')
    with open(temp_file, mode='w', encoding='utf-8') as f:
        f.write('Test message')
    await bot.send_document(temp_file)

    # Send long message (more than 4000 symbols)
    await bot.send_message('Very long message over 4000 symbols', split_message=True)

