/tg_tqdm

Extension for tqdm progressbar in Telegram

Primary LanguagePythonMIT LicenseMIT

tg_tqdm

Extension for tqdm progressbar in Telegram

Installation

pip install git+https://github.com/BukinPK/tg_tqdm

Usage

import time
from tg_tqdm import tg_tqdm

for _ in tg_tqdm(range(1000), TELEGRAM_BOT_TOKEN, CHAT_ID):
    time.sleep(0.1)

Tips

You can use this from different python scripts in parallel

tg_tqdm_how_it_work

What TELEGRAM_BOT_TOKEN and CHAT_ID?

You must create a bot that will send you the progress bar. But it's easy!

  • TELEGRAM_BOT_TOKEN
  1. Find @BotFather in Telegram

  2. Follow the instructions to create a new bot. Video guide: tg_tqdm_how_create_bot

    in video my TELEGRAM_BOT_TOKEN is 639207352:AAFJKonqGVcHIkMHLm46h1UVH7mtU4xJD70

  • CHAT_ID
  1. Open the chat with your new bot
  2. Write to him /start and one more message
  3. Run this code (where TELEGRAM_BOT_TOKEN from prev step)
import telegram.ext
updater = telegram.ext.Updater(token=TOKEN, use_context=True)
updater.bot.get_updates()[0]['message']['chat']['id']
  1. Result is you CHAT_ID