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.0.tar.gz (4.0 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.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartbar-1.0.0.tar.gz
  • Upload date:
  • Size: 4.0 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.0.tar.gz
Algorithm Hash digest
SHA256 123a37929c4e7b608bb274762beadf8ab21d6ce5d69d0747698cecc01c6ece04
MD5 1c7fcc30c40abe3c9384bcbe43792997
BLAKE2b-256 1eee6668113f7c70afe17456d008d23e2e416eb8c365c5cfac955a89073d5626

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartbar-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d2ee70fccdf30ddb174c1990a9fceb33f8a9d3560d234c75179f94fbc4cc0a5
MD5 c6aaeee481381f935a2625707e9a2de5
BLAKE2b-256 e201b19e12772e0de7084b14387bffc6d4c3be567302091b94abbea19bd9e59c

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