Skip to main content

Python 3x pypi

Overview

This module extends tqdm's tqdm class with basic colored sub-progressbars.

Tested in VS Code on a Linux server. No guarantees for other use cases.

Great for ML/DL, to track training loops and evaluation progress. E.g. ballanced training with undersampling and confusion-matrix:

basic

Installation

pip install colortqdm

Usage

Basic usage

Backwards compatible:

from colortqdm import colortqdm as ctqdm
import time

for _ in ctqdm(range(5000)):
    time.sleep(0.001)

basic

Known total:

from colortqdm import colortqdm as ctqdm
import time
import numpy as np

total = 5000
with ctqdm(total=total, desc="Known total") as pbar:
    for i, p in enumerate(np.random.uniform(0,1,total)):
        if p > i / total:
            pbar.update(1, color="green")
        else:
            pbar.update(1, color="red")
        time.sleep(0.001)

known_total

Unknown total:

from colortqdm import colortqdm as ctqdm
import time
import numpy as np

total = 5000
with ctqdm(total=None, desc="Unknown total") as pbar:
    for i, p in enumerate(np.random.uniform(0,1,total)):
        if p > i / total:
            pbar.update(1, color="green")
        else:
            pbar.update(1, color="red")
        time.sleep(0.001)

unknown_total

Available named colors

from colortqdm import colortqdm as ctqdm
import time
import numpy as np

total = 500
with ctqdm(total=total) as pbar:
    x = np.random.randint(0,10,total)
    for i in x:
        if i == 0:
            pbar.update(1, color="blue",    name="blue")
        elif i == 1:
            pbar.update(1, color="orange",  name="orange")
        elif i == 2:
            pbar.update(1, color="green",   name="green")
        elif i == 3:
            pbar.update(1, color="red",     name="red")
        elif i == 4:
            pbar.update(1, color="purple",  name="purple")
        elif i == 5:
            pbar.update(1, color="brown",   name="brown")
        elif i == 6:
            pbar.update(1, color="magenta", name="magenta")
        elif i == 7:
            pbar.update(1, color="grey",    name="grey")
        elif i == 8:
            pbar.update(1, color="yellow",  name="yellow")
        else:
            pbar.update(1)  #default (white)
        time.sleep(0.002)

colors

Custom colors

from colortqdm import colortqdm as ctqdm
import time
import numpy as np

total = 500
with ctqdm(total=total, desc="Custom RGB") as pbar:
    x = np.random.randint(0,4,total)
    for i in x:
        if i == 0:
            pbar.update(1, color=(208,244,244))
        elif i == 1:
            pbar.update(1, color=(238,213,255))
        elif i == 2:
            pbar.update(1, color=(255,192,215))
        else:
            pbar.update(1, color=(255,249,193))
        time.sleep(0.001)

custom_colors

License

This project is licensed under the MIT License (c) 2025 Bálint Csanády, aielte-research. See the LICENSE file for details.

Metadata

Release files for colortqdm 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colortqdm 0.0.1
File Size Uploaded Provenance Actions
colortqdm-0.0.1.tar.gz 24.8 kB Without provenance Details for colortqdm-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for colortqdm 0.0.1
File Interpreter ABI Platform Actions
colortqdm-0.0.1-py3-none-any.whl Python 3 none any Details for colortqdm-0.0.1-py3-none-any.whl

Total release size: 31.5 kB

Release files / colortqdm-0.0.1.tar.gz

Download URL colortqdm-0.0.1.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
264bff9d7947aa4e526b48eb125880afbf98ffd1f4f04a60da25f724b61d3d75
BLAKE2b-256 checksum
How to use checksums
dbd4393a59a44d23039d82d913c3a010ac44c5c4aa270b5ab677919d0d512128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.11

Release files / colortqdm-0.0.1-py3-none-any.whl

Download URL colortqdm-0.0.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93678059378f051236d98c28a179153c9a119bf26d2f2d5e75153d707e2db73f
BLAKE2b-256 checksum
How to use checksums
a719fb3f6058a2fa4d8b0d96008833d1fbd5e3a6abebaf78b32ef00ae9a93c17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.11

Security for colortqdm 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page