Skip to main content

Smartbar

Project description

SmartBar

SmartBar is a powerful, automatic, and extensible progress bar library for Python, built with smart I/O tracking and multi-threading support.
It provides real-time progress, ETA, speed tracking, and works seamlessly with file and network I/O using with blocks — no manual .update() needed.

Features

  • Thread-safe and concurrent
  • Supports multiple bars simultaneously
  • Automatically wraps open() and requests.get() to track progress
  • Works with both reading and writing
  • Smart ETA and speed calculation
  • Custom bar styles and position control
  • Pause, resume and ignore support
  • Friendly with context manager usage

Installation

pip install smartbar

Example Usage

from smartbar import SmartBar
import requests

with SmartBar("Downloading", length=40) as bar:
    r = requests.get("https://example.com/file", stream=True)
    for chunk in r.iter_content(1024):
        pass  # progress auto-tracked

Pause, Resume & Ignore

bar.pause()
# some time later...
bar.resume()

SmartBar.ignore(r)  # disables tracking for a specific response or file

Author

lama2923
GitHub: https://github.com/lama2923

License

This project is licensed under the MIT License.

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

smartbar-1.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

smartbar-1.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file smartbar-1.0.2.tar.gz.

File metadata

  • Download URL: smartbar-1.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for smartbar-1.0.2.tar.gz
Algorithm Hash digest
SHA256 885b7dc80f4362709c9e3b9a8a30f5e59a93a54686d16b239665d628eeb2e8b2
MD5 62fc453426267ec495a3c906d755454e
BLAKE2b-256 741a326e55b63ba68bb2628b7d8bf3acafdedb7c0e6da05cf5477259c1b3c328

See more details on using hashes here.

File details

Details for the file smartbar-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: smartbar-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for smartbar-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b4366053f15ba84fc9ebfddc2564c7ec596ec1981822420ac444c58da67e6c1
MD5 81172700a6755892d4a563c3cb928640
BLAKE2b-256 79a33deb5fcacf530ef3fbef341e0162f9c51924c99039c4532104b0a9fcfa8a

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