Skip to main content

Simple tqdm bar with asci cat faces.

Project description

CatQDM 🐱

A delightful progress bar library featuring animated cats! CatQDM provides both a simple cat progress bar and a more elaborate big cat with animated eyes and tail.

Features

  • Simple Cat Bar: A cute single-line cat progress bar
  • Big Cat Bar: A multi-line ASCII cat with animated eyes and tail
  • Notebook Support: Works seamlessly in Jupyter notebooks
  • Terminal Support: Full ANSI support for real terminals
  • Fallback Mode: Graceful degradation for unsupported environments

Installation

From PyPI (when published)

pip install catqdm

From Source

git clone https://github.com/yourusername/catqdm.git
cd catqdm
pip install -e .

Quick Start

Simple Cat Progress Bar

from catqdm import catbar

# Basic usage
for i in catbar(range(100)):
    # Your work here
    pass

Big Cat Progress Bar

from catqdm import big_cat_bar

# Basic usage with animated eyes and tail
for i in big_cat_bar(range(100)):
    # Your work here
    pass

Usage Examples

Simple Cat Bar

from catqdm import catbar
import time

# Basic iteration
for i in catbar(range(50), desc="Processing"):
    time.sleep(0.1)

# With custom description
for i in catbar(range(100), desc="🐱 Cat Processing"):
    time.sleep(0.05)

Big Cat Bar

from catqdm import big_cat_bar
import time

# Basic usage
for i in big_cat_bar(range(100), desc="Mood Upgrade"):
    time.sleep(0.05)

# Custom eyes animation
custom_eyes = ["T_T", ";_;", "-_-", "O_O", "^.^", "^_^"]
for i in big_cat_bar(range(100), eyes=custom_eyes, desc="Happy Cat",sleep_per=0.1  ):
   pass 


# Disable animations
for i in big_cat_bar(range(20), eyes=None, tails=None, desc="Static Cat"):
    time.sleep(0.1)

In Jupyter Notebooks

# Works seamlessly in notebooks
for i in big_cat_bar(range(50), desc="Notebook Cat"):
    # Your computation here
    pass

API Reference

catbar(iterable, **kwargs)

Simple cat progress bar.

Parameters:

  • iterable: Any iterable to track progress
  • desc: Description text (default: "Cat Processing")
  • **kwargs: Additional tqdm parameters

big_cat_bar(iterable, **kwargs)

Big cat progress bar with animated eyes and tail.

Parameters:

  • iterable: Any iterable to track progress
  • eyes: Sequence of eye strings for animation (default: predefined mood eyes)
  • tails: Sequence of tail strings for animation (default: ["(\", "/')"]`)
  • sleep_per: Optional sleep after each iteration (for demo/pacing)
  • desc: Description text (default: "Mood Upgrade")
  • live: Force live redraw (True) or static print (False). Default: auto-detect
  • center_term: Center cat horizontally in terminal mode (default: True)
  • **kwargs: Additional tqdm parameters

Backend Modes

CatQDM automatically selects the best backend for your environment:

  1. Notebook Mode: Uses IPython display for live updates in Jupyter
  2. ANSI Mode: Uses terminal escape codes for real TTY terminals
  3. Static Mode: Prints cat once and shows normal tqdm bar (fallback)

Customization

Custom Eye Animations

# Create your own eye progression
my_eyes = ["😿", "😾", "😸", "😺", "😻"]
for i in big_cat_bar(range(100), eyes=my_eyes):
    pass

Custom Tail Animations

# Create your own tail movements
my_tails = ["(`\\", "/')", "~`~", "=^=", "(`\\"]
for i in big_cat_bar(range(100), tails=my_tails):
    pass

Disable Animations

# Static cat (no eye/tail movement)
for i in big_cat_bar(range(100), eyes=None, tails=None):
    pass

Examples

Check out the examples/ directory for more detailed usage examples:

  • example.py: Command-line examples
  • example.ipynb: Jupyter notebook examples

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built on top of the excellent tqdm library
  • Inspired by the joy of cats and progress bars

Project details


Download files

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

Source Distribution

catqdm-0.1.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

catqdm-0.1.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file catqdm-0.1.1.tar.gz.

File metadata

  • Download URL: catqdm-0.1.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for catqdm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 23a352270f0ad0a0650500db06c996d9834937dd82209ca4ca0bb42afb56aac3
MD5 a8de34634c0b53df8f7d9c8332da226e
BLAKE2b-256 7cb00a917319ac8d6783767376befeb69ea3765dbeaa43e8a8fbeda538ffef86

See more details on using hashes here.

File details

Details for the file catqdm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: catqdm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for catqdm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc313550e45cd47600fdf688c67221df2e4f5256260d4e5f1772ee2d736f788c
MD5 24a349eb9684760a7e2d4f0de1e2c0d7
BLAKE2b-256 875583a081e66b1c61745a8e295d4d4d00bec4d4e6ff2dbde3864356ecd21f62

See more details on using hashes here.

Supported by

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