Skip to main content

Progress Table

PyPi version PyPI license codecov

Lightweight utility to display the progress of your process as a pretty table in the command line.

  • Alternative to TQDM whenever you want to track metrics produced by your process
  • Designed to monitor ML experiments, but works for any metrics-producing process
  • Allows you to see at a glance what's going on with your process
  • Increases readability and simplifies your command line logging
  • Is efficient: redraws only the modified rows

Change this:

example

Into this:

example

Examples

From examples/ directory:

  • Neural network training

example-training

  • Progress of multi-threaded downloads

example-download

  • Simulation and interactive display of Brownian motion

example-brown2d

  • Display of a game board

example-tictactoe

Quick start code

import random
import time

from progress_table import ProgressTable

# Create table object:
table = ProgressTable(num_decimal_places=1)

# You can (optionally) define the columns at the beginning
table.add_column("x", color="bold red")

for step in range(10):
    x = random.randint(0, 200)

    # You can add entries in a compact way
    table["x"] = x

    # Or you can use the update method
    table.update("x", value=x, weight=1.0)

    # Display the progress bar by wrapping an iterator or an integer
    for _ in table(10):  # -> Equivalent to `table(range(10))`
        # Set and get values from the table
        table["y"] = random.randint(0, 200)
        table["x-y"] = table["x"] - table["y"]
        table.update("average x-y", value=table["x-y"], weight=1.0, aggregate="mean")
        time.sleep(0.1)

    # Go to the next row when you're ready
    table.next_row()

# Close the table when it's finished
table.close()

Go to integrations page to see examples of integration with deep learning libraries.

Advanced usage

Go to advanced usage page for more information.

Troubleshooting

Excessive output

Progress Table works correctly in most consoles, but there are some exceptions:

  • Some cloud logging consoles (e.g. Kubernetes) do not handle live, carriage-return-based redraws properly. You can still use ProgressTable with interactive=0. This mode prints rows when they are finalized and does not display progress bars.

  • Some consoles, such as the PyCharm Python Console or IDLE, do not support moving the cursor to previous lines. You can still use ProgressTable with interactive=1. This mode can redraw the current line and display one progress-bar position, but previous rows remain visually frozen.

When interactive is omitted, it defaults to 1 in Jupyter, 0 when output is redirected, and 2 in an interactive terminal. Set it explicitly when creating the table, or override the automatic default with the PTABLE_INTERACTIVE environment variable, for example PTABLE_INTERACTIVE=1.

Other problems

If you encounter different messy outputs or other unexpected behavior: please create an issue!

Installation

Install Progress Table easily with pip:

pip install progress-table

Links

Alternatives

  • Progress bars: great for tracking progress, but they don't provide ways to display data in clear and compact way

    • tqdm
    • rich.progress
    • keras.utils.Progbar
  • Libraries displaying data: great for presenting tabular data, but they lack the progress tracking aspect

    • rich.table
    • tabulate
    • texttable

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

progress_table-3.3.4.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

progress_table-3.3.4-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file progress_table-3.3.4.tar.gz.

File metadata

  • Download URL: progress_table-3.3.4.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for progress_table-3.3.4.tar.gz
Algorithm Hash digest
SHA256 02cc403e583605cac04cda87bf7751f701781d8e376c0367167d71cb8510eed6
MD5 a160637550761f037bfba73820489ae5
BLAKE2b-256 0d9c1eaecfc2262939935af586d7c7abe49f9adfe869d5a65ab811db2125eda2

See more details on using hashes here.

File details

Details for the file progress_table-3.3.4-py3-none-any.whl.

File metadata

  • Download URL: progress_table-3.3.4-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for progress_table-3.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2412a91d84a14f4321e562471dcb0b93e37e0fb62f3b081be888a161f3956a
MD5 01b61b6c87d6acb71a80d69f13995fa4
BLAKE2b-256 fa8e148a14325ecff77ac98b480a01febf5abdd86f8315e0d777b4f79a43ac83

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page