liveBook · Manning

Progress bar

As explained in Python Concurrency with asyncio

A progress bar is a graphical control that indicates the completion state of an ongoing operation.

A progress bar is a graphical control that shows how much of a long-running operation has finished. In a URL stress-test application, it updates after each 1% of completed requests so users can track activity without guessing whether the interface is still working. section 7.4.2

A practical progress indicator supports the surrounding application by:

  • Displaying completion while asynchronous web requests run. section 7.4.2
  • Keeping the Tkinter interface responsive while asyncio performs work in another thread. section 7.4.2
  • Working alongside cancellation controls so the user can stop the operation. section 7.4.2

URL stress-test interface

A GUI accepts a URL and request count, starts the stress test when the user submits it, and advances the progress bar as requests finish. The Tkinter event loop remains in the main thread while asyncio runs in a separate thread and sends progress updates back to the interface. section 7.4.2

How Python Concurrency with asyncio covers it

How deep it goes
Explains update timing and threaded event-loop placement, but defers detailed progress-widget code.
Examples
Uses a URL stress tester that updates after every 1% of completed requests and permits cancellation.
What it assumes
Assumes familiarity with GUI widgets and asynchronous work while introducing communication between Tkinter and asyncio loops.
What you can do after
Operate a responsive GUI that reports asynchronous request progress and supports user cancellation.
How it connects
Connects progress bars with Tkinter, asyncio, threads, event loops, and asynchronous HTTP requests.

Also explained in

Compare how 2 books explain progress bar →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Python Concurrency with asyncio. The section links point to the parts of the book it draws on.