Skip to main content

Lightweight CLI progress bars

Project description

cliprog 📊

Lightweight CLI progress bars for Python.

Installation

pip install cliprog

Usage

Simple Iterator Wrapper

from cliprog import progress

for item in progress(items, desc="Processing"):
    process(item)

# Works with range
for i in progress(range(100)):
    do_work(i)

Manual Progress Bar

from cliprog import ProgressBar

bar = ProgressBar(total=100, desc="Downloading")
for chunk in download():
    save(chunk)
    bar.update(1)
bar.close()

Spinner

from cliprog import spinner

spin = spinner("Loading data")
for _ in range(10):
    spin.update()
    time.sleep(0.1)
spin.done("Data loaded!")

Output Examples

Processing [████████████████░░░░░░░░░░░░░░░░░░░░░░░░]  42.0% 42/100 ETA: 12s

Customization

bar = ProgressBar(
    total=100,
    desc="Custom",
    width=30,          # Bar width
    fill="▓",          # Filled character
    empty="░",         # Empty character
    show_percent=True, # Show percentage
    show_count=True,   # Show current/total
    show_eta=True,     # Show time remaining
)

License

MIT

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

pycliprog_rj-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

pycliprog_rj-1.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file pycliprog_rj-1.0.0.tar.gz.

File metadata

  • Download URL: pycliprog_rj-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pycliprog_rj-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c2abb98f3f13f29a999b089dda1b93610a00ec76627bc83454ab56401be59407
MD5 58cef0efdc0b1c250be3d265a257f5c7
BLAKE2b-256 ed978c9518044d9576c9f416f4859a01d5038dd84f8268000df43e77fcea0eb9

See more details on using hashes here.

File details

Details for the file pycliprog_rj-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pycliprog_rj-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pycliprog_rj-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 508f957861cbe50069763d04b8051733fd2241abe1638025b53d888fed70a7af
MD5 2ff880f4057e5d38b214ff70a2138b26
BLAKE2b-256 fff8011866a2a15e14be8c845fafe0955400b9c99d97e9d71ac8071354755998

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