Tqdm
-
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 originaltqdm
is in thetotal
parameter. When the user does not specifytotal
, we automatically calculate the length of theiterable
and set it astotal
. This design allows users to correctly display the progress bar without needing to specifytotal
. -
Parameters:
- iterable (
Iterable
): The object to iterate over. - desc (
str
): Description of the progress bar. - smoothing (
int
): Smoothing parameter. - kwargs (
Any
): Other parameters.
- iterable (
-
Example:
import docsaidkit as D
for i in D.Tqdm(range(100), desc='Processing'):
pass