Skip to main content

Tqdm

Tqdm(iterable=None, desc=None, smoothing=0, **kwargs)

  • Description: This is a custom progress bar inherited from tqdm, used to display progress during iteration over an iterable. The modification we made to the original tqdm is in the total parameter. When the user does not specify total, we automatically calculate the length of the iterable and set it as total. This design allows users to correctly display the progress bar without needing to specify total.

  • Parameters:

    • iterable (Iterable): The object to iterate over.
    • desc (str): Description of the progress bar.
    • smoothing (int): Smoothing parameter.
    • kwargs (Any): Other parameters.
  • Example:

    import docsaidkit as D

    for i in D.Tqdm(range(100), desc='Processing'):
    pass