Skip to content

tqdm.contrib.discord#

Sends updates to a Discord bot.

Usage:

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

screenshot

tqdm_discord Objects#

[view source]

class tqdm_discord(tqdm_auto)

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

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

__init__#

[view source]

def __init__(*args, **kwargs)

Parameters

  • token: str, required. Discord bot token
    [default: ${TQDM_DISCORD_TOKEN}].
  • channel_id: int, required. Discord channel ID
    [default: ${TQDM_DISCORD_CHANNEL_ID}].

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

tdrange#

[view source]

def tdrange(*args, **kwargs)

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