{
  "id": "task_libraries:progress-bar/python",
  "path": "/exapedia/python-progress-bar-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python progress bar libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python progress bar libraries show how far a loop, download, or long task has advanced in a terminal or notebook. A progress bar wraps an iterable or receives explicit updates and redraws its display as the count grows. These libraries let command-line tools and data scripts show users how much of a job remains."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python progress bar libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#click",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F128"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#rich",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tqdm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prompt-toolkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F175"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ipywidgets",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F192"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#progressbar",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#proglog",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#alive-progress",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F237"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#tqdm",
          "label": [
            {
              "t": "text",
              "text": "tqdm"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads among the dedicated progress bar libraries in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F161"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Iterable progress adapter",
            "Multiple bar layouts"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#click",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F128"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#rich",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tqdm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prompt-toolkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F175"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ipywidgets",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F192"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#progressbar",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#proglog",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#alive-progress",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F237"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "click",
          "name": [
            {
              "t": "fact",
              "fact": "F128"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pallets/click"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/click"
            },
            {
              "label": "Docs",
              "href": "https://click.palletsprojects.com/en/stable/api/#click.progressbar"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F135"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://click.palletsprojects.com/en/stable/api/#click.progressbar",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F128"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/CTFd/ctfcli",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F143"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def verify(self, challenge: str | None = None, ignore: tuple[str] = ()) -> int:\n    log.debug(f\"verify: (challenge={challenge}, ignore={ignore})\")\n\n    if challenge:\n        challenge_instance = self._resolve_single_challenge(challenge)\n        if not challenge_instance:\n            return 1\n\n        local_challenges = [challenge_instance]\n    else:\n        local_challenges = self._resolve_all_challenges()\n\n    if isinstance(ignore, str):\n        ignore = (ignore,)\n\n    remote_challenges = Challenge.load_installed_challenges()\n    if len(local_challenges) > 1:\n        # Issue a warning if there are extra challenges on the remote that do not have a local version\n        local_challenge_names = [c[\"name\"] for c in local_challenges]\n\n        for remote_challenge in remote_challenges:\n            if remote_challenge[\"name\"] not in local_challenge_names:\n                click.secho(\n                    f\"Found challenge '{remote_challenge['name']}' in CTFd, but not in .ctf/config\\n\"\n                    \"Please add the local challenge if you wish to manage it with ctfcli\\n\",\n                    fg=\"yellow\",\n                )\n\n    failed_verifications, challenges_in_sync, challenges_out_of_sync = [], [], []\n    with click.progressbar(local_challenges, label=\"Verifying challenges\") as challenges:\n        for challenge_instance in challenges:\n            try:\n                if not challenge_instance.verify(ignore=ignore):\n                    challenges_out_of_sync.append(challenge_instance)\n                else:\n                    challenges_in_sync.append(challenge_instance)\n\n            except ChallengeException as e:\n                click.secho(str(e), fg=\"red\")\n                failed_verifications.append(challenge_instance)\n\n    if len(failed_verifications) == 0:\n        click.secho(\"Success! All challenges verified!\", fg=\"green\")\n\n        if len(challenges_in_sync) > 0:\n            click.secho(\"Challenges in sync:\", fg=\"green\")\n            for challenge_instance in challenges_in_sync:\n                click.echo(f\" - {challenge_instance}\")\n\n        if len(challenges_out_of_sync) > 0:\n            click.secho(\"Challenges out of sync:\", fg=\"yellow\")\n            for challenge_instance in challenges_out_of_sync:\n                click.echo(f\" - {challenge_instance}\")\n\n        if len(challenges_out_of_sync) >= 1:\n            return 2\n\n        return 0\n\n    click.secho(\"Verification failed for:\", fg=\"red\")\n    for challenge_instance in failed_verifications:\n        click.echo(f\" - {challenge_instance}\")\n\n    return 1",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/CTFd/ctfcli/blob/f6a1cbad46606e437a798a243aba700205fab898/ctfcli/cli/challenges.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=click%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F128"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import click\n\nwith click.progressbar(range(3)) as bar:\n    for _ in bar:\n        pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/pallets/click/contents/src/click/termui.py?ref=8.5.1",
                  "label": [
                    {
                      "t": "text",
                      "text": "termui.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "rich",
          "name": [
            {
              "t": "fact",
              "fact": "F145"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Textualize/rich"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/rich"
            },
            {
              "label": "Docs",
              "href": "https://rich.readthedocs.io/en/stable/progress.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://rich.readthedocs.io/en/stable/progress.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Comfy-Org/comfy-cli",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F158"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def show_progress(iterable, total, description=\"Downloading...\"):\n    \"\"\"\n    Display progress bar for iterable processes, especially useful for file downloads.\n    Each item in the iterable should be a chunk of data, and the progress bar will advance\n    by the size of each chunk.\n\n    Args:\n        iterable (Iterable[bytes]): An iterable that yields chunks of data.\n        total (int): The total size of the data (e.g., total number of bytes) to be downloaded.\n        description (str): Description text for the progress bar.\n\n    Yields:\n        bytes: Chunks of data as they are processed.\n    \"\"\"\n    with Progress(transient=True) as progress:\n        task = progress.add_task(description, total=total)\n        for chunk in iterable:\n            yield chunk\n            progress.update(task, advance=len(chunk))",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Comfy-Org/comfy-cli/blob/545d57658cb3288e99de533c0405c52452b03ca6/comfy_cli/ui.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F157"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20rich%20for%20streamed-file%20reads%2C%20byte-counted%20downloads%20and%20training%20progress%20controls&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from rich.progress import track\n\nfor _ in track(range(3)):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://rich.readthedocs.io/en/stable/progress.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "progress.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F150"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "tqdm",
          "name": [
            {
              "t": "fact",
              "fact": "F160"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/tqdm/tqdm"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/tqdm"
            },
            {
              "label": "Docs",
              "href": "https://tqdm.github.io/docs/tqdm/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://tqdm.github.io/docs/tqdm/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F160"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/pytorch/vision",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F173"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _urlretrieve(url: str, filename: Union[str, pathlib.Path], chunk_size: int = 1024 * 32) -> None:\n    with urllib.request.urlopen(urllib.request.Request(url, headers={\"User-Agent\": USER_AGENT})) as response:\n        with open(filename, \"wb\") as fh, tqdm(total=response.length, unit=\"B\", unit_scale=True) as pbar:\n            while chunk := response.read(chunk_size):\n                fh.write(chunk)\n                pbar.update(len(chunk))",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/pytorch/vision/blob/4260301135e34180d865426765487113f84e7707/torchvision/datasets/utils.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F172"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20tqdm%20for%20streamed-file%20reads%2C%20byte-counted%20downloads%20and%20training%20progress%20controls&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F160"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from tqdm import tqdm\n\nfor _ in tqdm(range(3)):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://tqdm.github.io/docs/tqdm/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F165"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "prompt-toolkit",
          "name": [
            {
              "t": "fact",
              "fact": "F175"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/prompt-toolkit/python-prompt-toolkit"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/prompt-toolkit"
            },
            {
              "label": "Docs",
              "href": "https://python-prompt-toolkit.readthedocs.io/en/stable/pages/progress_bars.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://python-prompt-toolkit.readthedocs.io/en/stable/pages/progress_bars.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F175"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/papis/papis",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def progress_bar(iterable: Iterable[T]) -> Iterable[T]:\n    from prompt_toolkit.shortcuts import ProgressBar\n    from prompt_toolkit.shortcuts.progress_bar import formatters\n    from prompt_toolkit.styles import Style\n\n    # NOTE: this style is chosen to make it look like the default tqdm bar\n    style = Style.from_dict({\"bar-a\": \"reverse\"})\n    fmt = [\n        formatters.Percentage(),\n        formatters.Bar(start=\"|\", end=\"|\", sym_a=\" \", sym_b=\" \", sym_c=\" \"),\n        formatters.Text(\" \"),\n        formatters.Progress(),\n        formatters.Text(\" [\"),\n        formatters.TimeElapsed(),\n        formatters.Text(\"<\"),\n        formatters.TimeLeft(),\n        formatters.Text(\", \"),\n        formatters.IterationsPerSecond(),\n        formatters.Text(\" it/s]\"),\n        formatters.Text(\"  \"),\n    ]\n\n    with ProgressBar(style=style, formatters=fmt) as pb:\n        yield from pb(iterable)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/papis/papis/blob/f08274b6c3cba385397b29470f81158f51f3603e/papis/tui/utils.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F189"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=prompt-toolkit%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F175"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from prompt_toolkit.shortcuts import ProgressBar\n\nwith ProgressBar() as progress:\n    for _ in progress(range(3)):\n        pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://python-prompt-toolkit.readthedocs.io/en/stable/pages/progress_bars.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "progress_bars.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F180"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "ipywidgets",
          "name": [
            {
              "t": "fact",
              "fact": "F192"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/jupyter-widgets/ipywidgets"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/ipywidgets"
            },
            {
              "label": "Docs",
              "href": "https://ipywidgets.readthedocs.io/en/stable/reference/ipywidgets.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F199"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://ipywidgets.readthedocs.io/en/stable/reference/ipywidgets.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F192"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from ipywidgets import FloatProgress\nfrom IPython.display import display\n\nbar = FloatProgress(value=0, min=0, max=3)\ndisplay(bar)\nbar.value = 1\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ipywidgets.readthedocs.io/en/stable/reference/ipywidgets.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "ipywidgets.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=ipywidgets%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F192"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F197"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "progressbar",
          "name": [
            {
              "t": "fact",
              "fact": "F205"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/wolph/python-progressbar"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/progressbar2"
            },
            {
              "label": "Docs",
              "href": "https://progressbar-2.readthedocs.io/en/latest/progressbar.bar.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F64"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://progressbar-2.readthedocs.io/en/latest/progressbar.bar.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F205"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F72"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/coqui-ai/STT",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F218"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def create_progressbar(*args, **kwargs):\n    # Progress bars in stdout by default\n    if \"fd\" not in kwargs:\n        kwargs[\"fd\"] = sys.stdout\n\n    if Config.show_progressbar:\n        return progressbar.ProgressBar(*args, **kwargs)\n\n    return progressbar.NullBar(*args, **kwargs)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/coqui-ai/STT/blob/a562b940501937c0dd1d16e248dc15dc59089626/training/coqui_stt_training/util/config.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20progressbar2%20for%20streamed-file%20reads%2C%20byte-counted%20downloads%20and%20training%20progress%20controls&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F205"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import progressbar\n\nfor _ in progressbar.ProgressBar()(range(3)):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://progressbar-2.readthedocs.io/en/latest/progressbar.bar.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F210"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "proglog",
          "name": [
            {
              "t": "fact",
              "fact": "F220"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Edinburgh-Genome-Foundry/Proglog"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/proglog"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/Edinburgh-Genome-Foundry/proglog/contents/proglog/proglog.py?ref=v0.1.12"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F227"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/Edinburgh-Genome-Foundry/proglog/contents/proglog/proglog.py?ref=v0.1.12",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F220"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Zulko/moviepy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F235"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@requires_duration\n@use_clip_fps_by_default\ndef iter_frames(self, fps=None, with_times=False, logger=None, dtype=None):\n    \"\"\"Iterates over all the frames of the clip.\n\n    Returns each frame of the clip as a HxWxN Numpy array,\n    where N=1 for mask clips and N=3 for RGB clips.\n\n    This function is not really meant for video editing. It provides an\n    easy way to do frame-by-frame treatment of a video, for fields like\n    science, computer vision...\n\n    Parameters\n    ----------\n\n    fps : int, optional\n      Frames per second for clip iteration. Is optional if the clip already\n      has a ``fps`` attribute.\n\n    with_times : bool, optional\n      Ff ``True`` yield tuples of ``(t, frame)`` where ``t`` is the current\n      time for the frame, otherwise only a ``frame`` object.\n\n    logger : str, optional\n      Either ``\"bar\"`` for progress bar or ``None`` or any Proglog logger.\n\n    dtype : type, optional\n      Type to cast Numpy array frames. Use ``dtype=\"uint8\"`` when using the\n      pictures to write video, images..\n\n    Examples\n    --------\n\n\n    .. code:: python\n\n        # prints the maximum of red that is contained\n        # on the first line of each frame of the clip.\n        from moviepy import VideoFileClip\n        myclip = VideoFileClip('myvideo.mp4')\n        print([frame[0,:,0].max()\n              for frame in myclip.iter_frames()])\n    \"\"\"\n    logger = proglog.default_bar_logger(logger)\n    for frame_index in logger.iter_bar(\n        frame_index=np.arange(0, int(self.duration * fps))\n    ):\n        # int is used to ensure that floating point errors are rounded\n        # down to the nearest integer\n        t = frame_index / fps\n\n        frame = self.get_frame(t)\n        if (dtype is not None) and (frame.dtype != dtype):\n            frame = frame.astype(dtype)\n        if with_times:\n            yield t, frame\n        else:\n            yield frame",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Zulko/moviepy/blob/211e4b15f6ce4f34a6a9efbfff40590e43a68f77/moviepy/Clip.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=proglog%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F220"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from proglog import default_bar_logger\n\nlogger = default_bar_logger(\"bar\")\nfor _ in logger.iter_bar(step=range(3)):\n    pass\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/Edinburgh-Genome-Foundry/proglog/contents/proglog/proglog.py?ref=v0.1.12",
                  "label": [
                    {
                      "t": "text",
                      "text": "proglog.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F225"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "alive-progress",
          "name": [
            {
              "t": "fact",
              "fact": "F237"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rsalmei/alive-progress"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/alive-progress"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/rsalmei/alive-progress/contents/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F90"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/rsalmei/alive-progress/contents/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F237"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F97"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F98"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/poloclub/diffusiondb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F250"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def unzip_all(files: list):\n    \"\"\"\n    > Unzip all files in a list of files\n\n    :param files: list\n    :type files: list\n    \"\"\"\n    with alive_bar(len(files), title=\"Unzipping files\") as bar:\n        for file in files:\n            unzip_file(file)\n            time.sleep(0.1)\n            bar()",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/poloclub/diffusiondb/blob/bf0b01ee26119e16436fa67656ccb611f61be95f/scripts/download.py",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20alive-progress%20for%20streamed-file%20reads%2C%20byte-counted%20downloads%20and%20training%20progress%20controls&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F237"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from alive_progress import alive_bar\n\nwith alive_bar(3) as bar:\n    for _ in range(3):\n        bar()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/rsalmei/alive-progress/contents/alive_progress/core/progress.py?ref=v3.3.0",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F242"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python progress bar library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#tqdm",
          "label": [
            {
              "t": "text",
              "text": "tqdm"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits most loops and downloads, with a minimal iterable wrapper. "
        },
        {
          "t": "link",
          "href": "#rich",
          "label": [
            {
              "t": "text",
              "text": "Rich"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits command-line tools that already render rich terminal output. "
        },
        {
          "t": "link",
          "href": "#ipywidgets",
          "label": [
            {
              "t": "text",
              "text": "ipywidgets"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits progress bars inside Jupyter notebooks."
        }
      ]
    },
    {
      "q": "What is tqdm?",
      "a": [
        {
          "t": "link",
          "href": "#tqdm",
          "label": [
            {
              "t": "text",
              "text": "tqdm"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a progress meter that wraps any iterable or advances through explicit update calls. It can display byte counts with scaled units for downloads."
        }
      ]
    },
    {
      "q": "What is Rich in Python?",
      "a": [
        {
          "t": "link",
          "href": "#rich",
          "label": [
            {
              "t": "text",
              "text": "Rich"
            }
          ]
        },
        {
          "t": "text",
          "text": " renders formatted text, tables, progress bars, syntax highlighting, and Markdown in the terminal. Its progress display tracks several tasks with configurable columns."
        }
      ]
    },
    {
      "q": "How do I add a progress bar to a Python loop?",
      "a": [
        {
          "t": "link",
          "href": "#tqdm",
          "label": [
            {
              "t": "text",
              "text": "tqdm"
            }
          ]
        },
        {
          "t": "text",
          "text": " wraps the iterable in a loop and draws a bar that advances with each item. "
        },
        {
          "t": "link",
          "href": "#click",
          "label": [
            {
              "t": "text",
              "text": "Click"
            }
          ]
        },
        {
          "t": "text",
          "text": " offers the same pattern for applications built on Click."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, rich",
      "display": "Rich",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, rich",
      "display": "552.8M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, rich",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, rich",
      "display": "15.0.0, Apr 2026",
      "asOf": "2026-04-12"
    },
    "F5": {
      "label": "Package release date, rich",
      "display": "Apr 2026",
      "asOf": "2026-04-12"
    },
    "F6": {
      "label": "Repository stars, rich",
      "display": "57.8K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Wraps iterables, rich",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Manual progress updates, rich",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Multiple simultaneous bars, rich",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Coordinates log output, rich",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, rich",
      "display": "pip install rich",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, rich",
      "display": "Builds configurable progress displays with multiple tasks, custom columns, and console output.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, rich",
      "display": "Shows several concurrent task bars",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, rich",
      "display": "Track separate jobs together with task identifiers and individual totals.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, rich",
      "display": "Places logs above active bars",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, rich",
      "display": "Print through progress.console to preserve the live progress display.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, rich",
      "display": "Notebook progress needs manual refresh",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, rich",
      "display": "Call refresh or update with refresh enabled when using Jupyter.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, rich",
      "display": "Tasks share their display columns",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, rich",
      "display": "Use separate Progress instances when tasks need different columns.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, rich",
      "display": "import time\n\nfrom rich.progress import Progress\n\nwith Progress() as progress:\n\n    task1 = progress.add_task(\"[red]Downloading...\", total=1000)\n    task2 = progress.add_task(\"[green]Processing...\", total=1000)\n    task3 = progress.add_task(\"[cyan]Cooking...\", total=1000)\n\n    while not progress.finished:\n        progress.update(task1, advance=0.5)\n        progress.update(task2, advance=0.3)\n        progress.update(task3, advance=0.9)\n        time.sleep(0.02)\n\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, rich",
      "display": "def show_progress(iterable, total, description=\"Downloading...\"):\n    # ...\n    with Progress(transient=True) as progress:\n        task = progress.add_task(description, total=total)\n        for chunk in iterable:\n            yield chunk\n            progress.update(task, advance=len(chunk))\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, rich",
      "display": "ui.py · show_progress()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, rich",
      "display": "Comfy-Org/comfy-cli",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, Comfy-Org/comfy-cli",
      "display": "1.1K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, Comfy-Org/comfy-cli",
      "display": "Nov 2026",
      "asOf": "2026-11-15"
    },
    "F27": {
      "label": "Library name, tqdm",
      "display": "tqdm",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, tqdm",
      "display": "480.4M",
      "asOf": "2026-11-16"
    },
    "F29": {
      "label": "License, tqdm",
      "display": "MPL-2.0 AND MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, tqdm",
      "display": "4.70.1, Sep 2026",
      "asOf": "2026-09-11"
    },
    "F31": {
      "label": "Package release date, tqdm",
      "display": "Sep 2026",
      "asOf": "2026-09-11"
    },
    "F32": {
      "label": "Repository stars, tqdm",
      "display": "31.4K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Wraps iterables, tqdm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Manual progress updates, tqdm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Multiple simultaneous bars, tqdm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Coordinates log output, tqdm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, tqdm",
      "display": "pip install tqdm",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, tqdm",
      "display": "Adds progress meters to iterables, manual counters, and command-line pipelines.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, tqdm",
      "display": "Wraps existing iteration loops",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, tqdm",
      "display": "Add tqdm around an iterable or update a counter manually.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, tqdm",
      "display": "Tracks nested progress bars",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, tqdm",
      "display": "Show an outer job and its inner work on separate lines.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, tqdm",
      "display": "Regular prints disrupt active bars",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, tqdm",
      "display": "Use tqdm.write or redirect logging while a progress bar is open.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, tqdm",
      "display": "Nested bars need cursor movement",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, tqdm",
      "display": "Use a compatible terminal for separate live nested displays.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, tqdm",
      "display": "import logging\nfrom tqdm import trange\nfrom tqdm.contrib.logging import logging_redirect_tqdm\n\nLOG = logging.getLogger(__name__)\n\nif __name__ == '__main__':\n    logging.basicConfig(level=logging.INFO)\n    with logging_redirect_tqdm():\n        for i in trange(9):\n            if i == 4:\n                LOG.info(\"console logging redirected to `tqdm.write()`\")\n    # logging restored\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, tqdm",
      "display": "@contextmanager\ndef tqdm_stream_file(path: Path | str) -> Iterator[io.BufferedReader]:\n    # ...\n    if isinstance(path, str):\n        path = Path(path)\n\n    with path.open(\"rb\") as f:\n        total_size = path.stat().st_size\n        pbar = tqdm(\n            unit=\"B\",\n            unit_scale=True,\n            total=total_size,\n            initial=0,\n            desc=path.name,\n        )\n\n        f_read = f.read\n\n        def _inner_read(size: int | None = -1) -> bytes:\n            data = f_read(size)\n            pbar.update(len(data))\n            return data\n\n        f.read = _inner_read  # type: ignore\n\n        yield f\n\n        pbar.close()\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, tqdm",
      "display": "tqdm.py · tqdm_stream_file()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, tqdm",
      "display": "huggingface/huggingface_hub",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, huggingface/huggingface_hub",
      "display": "4.1K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, huggingface/huggingface_hub",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F53": {
      "label": "Library name, progressbar2",
      "display": "progressbar2",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, progressbar2",
      "display": "17.7M",
      "asOf": "2026-11-16"
    },
    "F55": {
      "label": "License, progressbar2",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, progressbar2",
      "display": "4.7.0, Nov 2026",
      "asOf": "2026-11-05"
    },
    "F57": {
      "label": "Package release date, progressbar2",
      "display": "Nov 2026",
      "asOf": "2026-11-05"
    },
    "F58": {
      "label": "Repository stars, progressbar2",
      "display": "880",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Wraps iterables, progressbar2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Manual progress updates, progressbar2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Multiple simultaneous bars, progressbar2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Coordinates log output, progressbar2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, progressbar2",
      "display": "pip install progressbar2",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, progressbar2",
      "display": "Composes widget-based progress bars and named concurrent terminal displays.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, progressbar2",
      "display": "Combines named concurrent bars",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, progressbar2",
      "display": "Update several tasks through a shared MultiBar display.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, progressbar2",
      "display": "Places printed logs above bars",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, progressbar2",
      "display": "Enable redirect_stdout to preserve the display while printing.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, progressbar2",
      "display": "Child bars need explicit completion",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, progressbar2",
      "display": "Call finish on each child before leaving its MultiBar context.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations lead, progressbar2",
      "display": "IDLE cannot render terminal bars",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "limitations, progressbar2",
      "display": "Use a terminal that supports the display’s cursor controls.",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Quickstart, progressbar2",
      "display": "\"\"\"Two named bars progressing at different rates in one terminal.\"\"\"\n\nimport sys\nimport time\n\nimport progressbar\n\nSTEPS = 24\n\n\ndef main() -> None:\n    with progressbar.MultiBar(fd=sys.stdout) as multibar:\n        build = multibar['build']\n        test = multibar['test']\n        build.max_value = STEPS\n        test.max_value = STEPS\n        for step in range(STEPS):\n            build.update(step + 1)\n            test.update(min(STEPS, max(0, round((step - 3) * 1.2))))\n            # Longer than the bars' 0.05s update gate, so every step\n            # lands as a visible redraw.\n            time.sleep(0.1)\n\n        # Reaching max_value doesn't finish a bar -- only finish() does.\n        # A MultiBar waits for every bar to report finished() before its\n        # context manager can exit, so without these calls the block\n        # above would hang forever on exit.\n        build.finish()\n        test.finish()\n\n\nif __name__ == '__main__':\n    main()\n",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project function, progressbar2",
      "display": "def create_progressbar(*args, **kwargs):\n    # Progress bars in stdout by default\n    if \"fd\" not in kwargs:\n        kwargs[\"fd\"] = sys.stdout\n\n    if Config.show_progressbar:\n        return progressbar.ProgressBar(*args, **kwargs)\n\n    return progressbar.NullBar(*args, **kwargs)\n",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project function reference, progressbar2",
      "display": "config.py · create_progressbar()",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project repository, progressbar2",
      "display": "coqui-ai/STT",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project stars, coqui-ai/STT",
      "display": "2.6K",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Project push date, coqui-ai/STT",
      "display": "Mar 2024",
      "asOf": "2024-03-11"
    },
    "F79": {
      "label": "Library name, alive-progress",
      "display": "alive-progress",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Monthly downloads, alive-progress",
      "display": "2.9M",
      "asOf": "2026-11-16"
    },
    "F81": {
      "label": "License, alive-progress",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Package release, alive-progress",
      "display": "3.3.0, Jul 2025",
      "asOf": "2025-07-20"
    },
    "F83": {
      "label": "Package release date, alive-progress",
      "display": "Jul 2025",
      "asOf": "2025-07-20"
    },
    "F84": {
      "label": "Repository stars, alive-progress",
      "display": "6.3K",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Wraps iterables, alive-progress",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Manual progress updates, alive-progress",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Multiple simultaneous bars, alive-progress",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Coordinates log output, alive-progress",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Install, alive-progress",
      "display": "pip install alive-progress",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "What it does, alive-progress",
      "display": "Shows animated progress, throughput, and final receipts with integrated print and logging hooks.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths lead, alive-progress",
      "display": "Coordinates prints from different threads",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths, alive-progress",
      "display": "Print and logging hooks synchronize messages around the active bar.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths lead, alive-progress",
      "display": "Handles work without known totals",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "strengths, alive-progress",
      "display": "Show activity and throughput before a reliable completion total is available.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations lead, alive-progress",
      "display": "Supports one active bar",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations, alive-progress",
      "display": "Choose another display for simultaneous nested progress bars.",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations lead, alive-progress",
      "display": "Noninteractive output shows final receipts",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "limitations, alive-progress",
      "display": "Expect completion receipts instead of animations in redirected or background output.",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Quickstart, alive-progress",
      "display": "from alive_progress import alive_bar\nimport time\n\nfor x in 1000, 1500, 700, 0:\n    with alive_bar(x) as bar:\n        for i in range(1000):\n            time.sleep(.005)\n            bar()\n",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "Adding progress to a loop",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose tqdm",
      "display": "iterable wrapping and manual counters",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "adding progress to a loop",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "When to consider rich",
      "display": "several independently updated tasks need one display",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "Several concurrent tasks",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose rich",
      "display": "separate task identifiers and totals",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "several concurrent tasks",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "When to consider tqdm",
      "display": "wrapping an existing loop is enough",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need",
      "display": "Threaded printed messages",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Why choose alive-progress",
      "display": "synchronized print and logging hooks",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need in introduction",
      "display": "threaded printed messages",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "When to consider rich",
      "display": "several progress bars must remain visible together",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need",
      "display": "Named terminal task displays",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Why choose progressbar2",
      "display": "a shared MultiBar display",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Developer need in introduction",
      "display": "named terminal task displays",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "When to consider alive-progress",
      "display": "coordinating threaded printed messages is the main requirement",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "Page introduction",
      "display": "Python progress bar libraries let developers display the progress of running tasks.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Which Python progress bar should I choose?",
      "display": "tqdm wraps existing iterables.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Which Python progress bar should I choose?",
      "display": "Rich displays multiple concurrent tasks.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Which Python progress bar should I choose?",
      "display": "alive-progress coordinates messages printed from different threads.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Which Python progress bar should I choose?",
      "display": "progressbar2 provides named bars through MultiBar.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Can ordinary print calls disrupt tqdm?",
      "display": "Use tqdm.write or redirect console logging while a bar is open.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Why does Rich progress stop refreshing inside a notebook?",
      "display": "Automatic refresh is disabled in Jupyter; refresh explicitly, update with refresh enabled, or use track.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can Rich tasks have different columns?",
      "display": "A Progress instance shares columns across tasks; use several instances for different layouts.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Can alive-progress show nested bars at once?",
      "display": "Its own hook manager explicitly rejects nested active progress contexts.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Why does alive-progress show only a completion receipt in logs?",
      "display": "Noninteractive terminals disable animations and retain the final receipt.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Why can a MultiBar context wait after every task reaches its total?",
      "display": "Each child must report finished; call finish before leaving the context.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Can a bar estimate completion before the total is known?",
      "display": "alive-progress unknown mode shows activity and throughput while completion progress and ETA remain indeterminate.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "Library name, click",
      "display": "Click",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Monthly downloads, click",
      "display": "1.1B",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "License, click",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Package release, click",
      "display": "8.5.1",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Package release date, click",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Install, click",
      "display": "python3.13 -m pip install click==8.5.1",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Quickstart, click",
      "display": "import click\n\nwith click.progressbar(range(3)) as bar:\n    for _ in bar:\n        pass\n",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Official description, click",
      "display": "Builds composable command-line interfaces.",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Quickstart source file, click",
      "display": "termui.py",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Repository stars, click",
      "display": "17.8K",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Iterable progress adapter, click",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Multiple bar layouts, click",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Progress control interface, click",
      "display": "Progress integrated with existing Click command-line applications and styled CLI output.",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project function, click",
      "display": "def verify(self, challenge: str | None = None, ignore: tuple[str] = ()) -> int:\n    log.debug(f\"verify: (challenge={challenge}, ignore={ignore})\")\n\n    if challenge:\n        challenge_instance = self._resolve_single_challenge(challenge)\n        if not challenge_instance:\n            return 1\n\n        local_challenges = [challenge_instance]\n    else:\n        local_challenges = self._resolve_all_challenges()\n\n    if isinstance(ignore, str):\n        ignore = (ignore,)\n\n    remote_challenges = Challenge.load_installed_challenges()\n    if len(local_challenges) > 1:\n        # Issue a warning if there are extra challenges on the remote that do not have a local version\n        local_challenge_names = [c[\"name\"] for c in local_challenges]\n\n        for remote_challenge in remote_challenges:\n            if remote_challenge[\"name\"] not in local_challenge_names:\n                click.secho(\n                    f\"Found challenge '{remote_challenge['name']}' in CTFd, but not in .ctf/config\\n\"\n                    \"Please add the local challenge if you wish to manage it with ctfcli\\n\",\n                    fg=\"yellow\",\n                )\n\n    failed_verifications, challenges_in_sync, challenges_out_of_sync = [], [], []\n    with click.progressbar(local_challenges, label=\"Verifying challenges\") as challenges:\n        for challenge_instance in challenges:\n            try:\n                if not challenge_instance.verify(ignore=ignore):\n                    challenges_out_of_sync.append(challenge_instance)\n                else:\n                    challenges_in_sync.append(challenge_instance)\n\n            except ChallengeException as e:\n                click.secho(str(e), fg=\"red\")\n                failed_verifications.append(challenge_instance)\n\n    if len(failed_verifications) == 0:\n        click.secho(\"Success! All challenges verified!\", fg=\"green\")\n\n        if len(challenges_in_sync) > 0:\n            click.secho(\"Challenges in sync:\", fg=\"green\")\n            for challenge_instance in challenges_in_sync:\n                click.echo(f\" - {challenge_instance}\")\n\n        if len(challenges_out_of_sync) > 0:\n            click.secho(\"Challenges out of sync:\", fg=\"yellow\")\n            for challenge_instance in challenges_out_of_sync:\n                click.echo(f\" - {challenge_instance}\")\n\n        if len(challenges_out_of_sync) >= 1:\n            return 2\n\n        return 0\n\n    click.secho(\"Verification failed for:\", fg=\"red\")\n    for challenge_instance in failed_verifications:\n        click.echo(f\" - {challenge_instance}\")\n\n    return 1",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Project source file, click",
      "display": "ctfcli/cli/challenges.py",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project full_name, click",
      "display": "CTFd/ctfcli",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project stargazers_count, click",
      "display": "223",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Library name, rich",
      "display": "Rich",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Monthly downloads, rich",
      "display": "575.1M",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "License, rich",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Package release, rich",
      "display": "15.0.0",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Package release date, rich",
      "display": "Apr 2026",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Install, rich",
      "display": "python3.13 -m pip install rich==15.0.0",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Quickstart, rich",
      "display": "from rich.progress import track\n\nfor _ in track(range(3)):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Repository stars, rich",
      "display": "57.8K",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Iterable progress adapter, rich",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Multiple bar layouts, rich",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Progress control interface, rich",
      "display": "Task IDs and configurable column layout when progress accompanies rich terminal renderables.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Project function, rich",
      "display": "def show_progress(iterable, total, description=\"Downloading...\"):\n    \"\"\"\n    Display progress bar for iterable processes, especially useful for file downloads.\n    Each item in the iterable should be a chunk of data, and the progress bar will advance\n    by the size of each chunk.\n\n    Args:\n        iterable (Iterable[bytes]): An iterable that yields chunks of data.\n        total (int): The total size of the data (e.g., total number of bytes) to be downloaded.\n        description (str): Description text for the progress bar.\n\n    Yields:\n        bytes: Chunks of data as they are processed.\n    \"\"\"\n    with Progress(transient=True) as progress:\n        task = progress.add_task(description, total=total)\n        for chunk in iterable:\n            yield chunk\n            progress.update(task, advance=len(chunk))",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Project source file, rich",
      "display": "comfy_cli/ui.py",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Project full_name, rich",
      "display": "Comfy-Org/comfy-cli",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project stargazers_count, rich",
      "display": "1.1K",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Library name, tqdm",
      "display": "tqdm",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Monthly downloads, tqdm",
      "display": "497.2M",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "License, tqdm",
      "display": "MPL-2.0 AND MIT",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Package release, tqdm",
      "display": "4.70.1",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Package release date, tqdm",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Install, tqdm",
      "display": "python3.13 -m pip install tqdm==4.70.1",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Quickstart, tqdm",
      "display": "from tqdm import tqdm\n\nfor _ in tqdm(range(3)):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Repository stars, tqdm",
      "display": "31.4K",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Iterable progress adapter, tqdm",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Multiple bar layouts, tqdm",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Progress control interface, tqdm",
      "display": "Minimal iterable wrapper and explicit byte-stream update meter.",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Project function, tqdm",
      "display": "def _urlretrieve(url: str, filename: Union[str, pathlib.Path], chunk_size: int = 1024 * 32) -> None:\n    with urllib.request.urlopen(urllib.request.Request(url, headers={\"User-Agent\": USER_AGENT})) as response:\n        with open(filename, \"wb\") as fh, tqdm(total=response.length, unit=\"B\", unit_scale=True) as pbar:\n            while chunk := response.read(chunk_size):\n                fh.write(chunk)\n                pbar.update(len(chunk))",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Project source file, tqdm",
      "display": "torchvision/datasets/utils.py",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Project full_name, tqdm",
      "display": "pytorch/vision",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Project stargazers_count, tqdm",
      "display": "18.0K",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Library name, prompt-toolkit",
      "display": "prompt_toolkit",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Monthly downloads, prompt-toolkit",
      "display": "225.0M",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "License, prompt-toolkit",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Package release, prompt-toolkit",
      "display": "3.0.53",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Package release date, prompt-toolkit",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Install, prompt-toolkit",
      "display": "python3.13 -m pip install prompt-toolkit==3.0.53",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Quickstart, prompt-toolkit",
      "display": "from prompt_toolkit.shortcuts import ProgressBar\n\nwith ProgressBar() as progress:\n    for _ in progress(range(3)):\n        pass\n",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Official description, prompt-toolkit",
      "display": "Builds interactive command lines in Python.",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart source file, prompt-toolkit",
      "display": "progress_bars.html",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Repository stars, prompt-toolkit",
      "display": "10.6K",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Iterable progress adapter, prompt-toolkit",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Multiple bar layouts, prompt-toolkit",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Progress control interface, prompt-toolkit",
      "display": "Interactive progress application with keyboard bindings, formatted toolbar, and parallel task counters.",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Project function, prompt-toolkit",
      "display": "def progress_bar(iterable: Iterable[T]) -> Iterable[T]:\n    from prompt_toolkit.shortcuts import ProgressBar\n    from prompt_toolkit.shortcuts.progress_bar import formatters\n    from prompt_toolkit.styles import Style\n\n    # NOTE: this style is chosen to make it look like the default tqdm bar\n    style = Style.from_dict({\"bar-a\": \"reverse\"})\n    fmt = [\n        formatters.Percentage(),\n        formatters.Bar(start=\"|\", end=\"|\", sym_a=\" \", sym_b=\" \", sym_c=\" \"),\n        formatters.Text(\" \"),\n        formatters.Progress(),\n        formatters.Text(\" [\"),\n        formatters.TimeElapsed(),\n        formatters.Text(\"<\"),\n        formatters.TimeLeft(),\n        formatters.Text(\", \"),\n        formatters.IterationsPerSecond(),\n        formatters.Text(\" it/s]\"),\n        formatters.Text(\"  \"),\n    ]\n\n    with ProgressBar(style=style, formatters=fmt) as pb:\n        yield from pb(iterable)",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Project source file, prompt-toolkit",
      "display": "papis/tui/utils.py",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Project full_name, prompt-toolkit",
      "display": "papis/papis",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Project stargazers_count, prompt-toolkit",
      "display": "1.8K",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Library name, ipywidgets",
      "display": "ipywidgets",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Monthly downloads, ipywidgets",
      "display": "36.7M",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "License, ipywidgets",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Package release, ipywidgets",
      "display": "8.1.9",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Package release date, ipywidgets",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Install, ipywidgets",
      "display": "python3.13 -m pip install ipywidgets==8.1.9 ipython",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Quickstart, ipywidgets",
      "display": "from ipywidgets import FloatProgress\nfrom IPython.display import display\n\nbar = FloatProgress(value=0, min=0, max=3)\ndisplay(bar)\nbar.value = 1\n",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Official description, ipywidgets",
      "display": "Provides interactive widgets for Jupyter.",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Quickstart source file, ipywidgets",
      "display": "ipywidgets.html",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Repository stars, ipywidgets",
      "display": "3.3K",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Iterable progress adapter, ipywidgets",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Multiple bar layouts, ipywidgets",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Progress control interface, ipywidgets",
      "display": "Notebook widget progress with manual value/trait control and composite widget layout.",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Library name, progressbar2",
      "display": "progressbar2",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Monthly downloads, progressbar2",
      "display": "17.7M",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "License, progressbar2",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Package release, progressbar2",
      "display": "4.7.1",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Package release date, progressbar2",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Install, progressbar2",
      "display": "python3.13 -m pip install progressbar2==4.7.1",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Quickstart, progressbar2",
      "display": "import progressbar\n\nfor _ in progressbar.ProgressBar()(range(3)):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Repository stars, progressbar2",
      "display": "880",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Iterable progress adapter, progressbar2",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Multiple bar layouts, progressbar2",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Progress control interface, progressbar2",
      "display": "Widget-based text progress with explicit no-output NullBar and current MultiBar manager.",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Project function, progressbar2",
      "display": "def create_progressbar(*args, **kwargs):\n    # Progress bars in stdout by default\n    if \"fd\" not in kwargs:\n        kwargs[\"fd\"] = sys.stdout\n\n    if Config.show_progressbar:\n        return progressbar.ProgressBar(*args, **kwargs)\n\n    return progressbar.NullBar(*args, **kwargs)",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Project source file, progressbar2",
      "display": "training/coqui_stt_training/util/config.py",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Project full_name, progressbar2",
      "display": "coqui-ai/STT",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Project stargazers_count, progressbar2",
      "display": "2.6K",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Library name, proglog",
      "display": "Proglog",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Monthly downloads, proglog",
      "display": "5.5M",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "License, proglog",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Package release, proglog",
      "display": "0.1.12",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Package release date, proglog",
      "display": "May 2025",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Install, proglog",
      "display": "python3.13 -m pip install proglog==0.1.12",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Quickstart, proglog",
      "display": "from proglog import default_bar_logger\n\nlogger = default_bar_logger(\"bar\")\nfor _ in logger.iter_bar(step=range(3)):\n    pass\n",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Official description, proglog",
      "display": "Manages logs and progress bars for consoles, notebooks, and the web.",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Quickstart source file, proglog",
      "display": "proglog.py",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Repository stars, proglog",
      "display": "112",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Iterable progress adapter, proglog",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Multiple bar layouts, proglog",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Progress control interface, proglog",
      "display": "Named logger/bar protocol for libraries that accept a logger argument, with tqdm-backed or muted output.",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Project function, proglog",
      "display": "@requires_duration\n@use_clip_fps_by_default\ndef iter_frames(self, fps=None, with_times=False, logger=None, dtype=None):\n    \"\"\"Iterates over all the frames of the clip.\n\n    Returns each frame of the clip as a HxWxN Numpy array,\n    where N=1 for mask clips and N=3 for RGB clips.\n\n    This function is not really meant for video editing. It provides an\n    easy way to do frame-by-frame treatment of a video, for fields like\n    science, computer vision...\n\n    Parameters\n    ----------\n\n    fps : int, optional\n      Frames per second for clip iteration. Is optional if the clip already\n      has a ``fps`` attribute.\n\n    with_times : bool, optional\n      Ff ``True`` yield tuples of ``(t, frame)`` where ``t`` is the current\n      time for the frame, otherwise only a ``frame`` object.\n\n    logger : str, optional\n      Either ``\"bar\"`` for progress bar or ``None`` or any Proglog logger.\n\n    dtype : type, optional\n      Type to cast Numpy array frames. Use ``dtype=\"uint8\"`` when using the\n      pictures to write video, images..\n\n    Examples\n    --------\n\n\n    .. code:: python\n\n        # prints the maximum of red that is contained\n        # on the first line of each frame of the clip.\n        from moviepy import VideoFileClip\n        myclip = VideoFileClip('myvideo.mp4')\n        print([frame[0,:,0].max()\n              for frame in myclip.iter_frames()])\n    \"\"\"\n    logger = proglog.default_bar_logger(logger)\n    for frame_index in logger.iter_bar(\n        frame_index=np.arange(0, int(self.duration * fps))\n    ):\n        # int is used to ensure that floating point errors are rounded\n        # down to the nearest integer\n        t = frame_index / fps\n\n        frame = self.get_frame(t)\n        if (dtype is not None) and (frame.dtype != dtype):\n            frame = frame.astype(dtype)\n        if with_times:\n            yield t, frame\n        else:\n            yield frame",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Project source file, proglog",
      "display": "moviepy/Clip.py",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Project full_name, proglog",
      "display": "Zulko/moviepy",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Project stargazers_count, proglog",
      "display": "15.2K",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Library name, alive-progress",
      "display": "alive-progress",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Monthly downloads, alive-progress",
      "display": "3.1M",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "License, alive-progress",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Package release, alive-progress",
      "display": "3.3.0",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Package release date, alive-progress",
      "display": "Jul 2025",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Install, alive-progress",
      "display": "python3.13 -m pip install alive-progress==3.3.0",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Quickstart, alive-progress",
      "display": "from alive_progress import alive_bar\n\nwith alive_bar(3) as bar:\n    for _ in range(3):\n        bar()\n",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Repository stars, alive-progress",
      "display": "6.3K",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Iterable progress adapter, alive-progress",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Multiple bar layouts, alive-progress",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Progress control interface, alive-progress",
      "display": "Animated single progress meter with automatic live throughput/ETA and iterable adapter; concurrent bars remain unsupported.",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Project function, alive-progress",
      "display": "def unzip_all(files: list):\n    \"\"\"\n    > Unzip all files in a list of files\n\n    :param files: list\n    :type files: list\n    \"\"\"\n    with alive_bar(len(files), title=\"Unzipping files\") as bar:\n        for file in files:\n            unzip_file(file)\n            time.sleep(0.1)\n            bar()",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Project source file, alive-progress",
      "display": "scripts/download.py",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project full_name, alive-progress",
      "display": "poloclub/diffusiondb",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Project stargazers_count, alive-progress",
      "display": "1.4K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python progress bar libraries tqdm Rich alive-progress progressbar2 examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
