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.3.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.3-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: progress_table-3.3.3.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.3.tar.gz
Algorithm Hash digest
SHA256 2bb34d41b551d61e16e491c679c70c61a473a3d5958f0bea07ce63cfbcbd40aa
MD5 90c6275efca00e4774ef3fd5486e5785
BLAKE2b-256 9b47d0165d640ef14ff2ee3281bae70f97abf044d523f6b2140ab2e8384634ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: progress_table-3.3.3-py3-none-any.whl
  • Upload date:
  • Size: 21.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 56af6294e1782a144f58be6538feae5faef2b5bd40876a199c2300e0fafe4f4a
MD5 19f65284250bfec10c883f6525c17c43
BLAKE2b-256 a49369c8a345ca794549762502faedacc1b3c80ce32a0c567205a098037ac261

See more details on using hashes here.

Release history Release notifications | RSS feed

3.3.4

2 files

This release

3.3.3 This release

2 files

3.3.2

2 files

3.3.1

2 files

3.3.0

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.3.2

1 file

2.3.1

1 file

2.3.0

1 file

2.2.8

1 file

2.2.7

1 file

2.2.6

1 file

2.2.5

1 file

2.2.4

1 file

2.2.3

1 file

2.2.2

1 file

2.2.1

1 file

2.2.0

1 file

2.1.0

1 file

2.0.0

1 file

1.3.2

1 file

1.3.1

1 file

1.3.0

1 file

1.2.5

1 file

1.2.4

1 file

1.2.3

1 file

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.0

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.1.27

1 file

0.1.26

1 file

0.1.25

1 file

0.1.24

1 file

0.1.23

1 file

0.1.22

1 file

0.1.21

1 file

0.1.20

1 file

0.1.19

1 file

0.1.18

1 file

0.1.17

1 file

0.1.16

1 file

0.1.15

1 file

0.1.14

1 file

0.1.13

1 file

0.1.12

1 file

0.1.11

1 file

0.1.10

1 file

0.1.9

1 file

0.1.8

1 file

0.1.7

1 file

0.1.6

1 file

0.1.5

1 file

0.1.4

1 file

0.1.3

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.29

1 file

0.0.28

1 file

0.0.27

1 file

0.0.26

1 file

0.0.25

1 file

0.0.24

1 file

0.0.23

1 file

0.0.22

1 file

0.0.21

1 file

0.0.20

1 file

0.0.19

1 file

0.0.18

1 file

0.0.17

1 file

0.0.16

1 file

0.0.15

1 file

0.0.14

1 file

0.0.13

1 file

0.0.12

1 file

0.0.11

1 file

0.0.10

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

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