Skip to content

tqdm.contrib.telegram#

Sends updates to a Telegram bot.

Usage:

>>> from tqdm.contrib.telegram import tqdm, trange
>>> for i in trange(10, token='{token}', chat_id='{chat_id}'):
...     ...

screenshot

tqdm_telegram Objects#

[view source]

class tqdm_telegram(tqdm_auto)

Standard tqdm.auto.tqdm but also sends updates to a Telegram Bot. May take a few seconds to create (__init__).

>>> from tqdm.contrib.telegram import tqdm, trange
>>> for i in tqdm(iterable, token='{token}', chat_id='{chat_id}'):
...     ...

__init__#

[view source]

def __init__(*args, **kwargs)

Parameters

  • token: str, required. Telegram token
    [default: ${TQDM_TELEGRAM_TOKEN}].
  • chat_id: str, required. Telegram chat ID
    [default: ${TQDM_TELEGRAM_CHAT_ID}].

See tqdm.auto.tqdm.__init__ for other parameters.

ttgrange#

[view source]

def ttgrange(*args, **kwargs)

Shortcut for tqdm.contrib.telegram.tqdm(range(*args), **kwargs).