async-progressbar
An asynchronous progress bar for Python, supporting both terminal and Jupyter notebook environments.
Installation
pip install async-progressbar
Usage
Basic Example
import asyncio
from async_progressbar import AsyncProgressBar
async def main():
total = 100
bar = AsyncProgressBar(total)
for _ in range(total):
await asyncio.sleep(0.01)
await bar.update(1)
await bar.finish()
asyncio.run(main())
With aiolimiter (rate-limited requests)
import asyncio
import random
import time
from async_progressbar import AsyncProgressBar
import aiolimiter
number_of_requests = 1000
rate_limiter = aiolimiter.AsyncLimiter(500, 1)
progressbar = AsyncProgressBar(number_of_requests)
async def request(i):
async with rate_limiter:
await progressbar.update(1)
await asyncio.sleep(random.random() * 0.01)
return i
async def main():
await asyncio.gather(*(request(i) for i in range(number_of_requests)))
await progressbar.finish()
if __name__ == "__main__":
t1 = time.time()
asyncio.run(main())
print(f"Total time: {time.time() - t1:.2f} seconds")
In Jupyter Notebooks
The progress bar will automatically use an interactive widget if run in a Jupyter notebook.
API
AsyncProgressBar(total, leave=True, prefix="", suffix="", fill="█", minimum_interval=0.1)update(progress=1): Increment the progress bar.draw(): Redraw the progress bar.finish(): Mark the progress bar as finished.reset(): Reset the progress bar.
Testing
To run the tests:
pytest
Metadata
Release files for async-progressbar 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| async_progressbar-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / async_progressbar-0.1.2-py3-none-any.whl
| Download URL | async_progressbar-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
038704def19d3f1071794317e7440774671317446439b2c230ca6641ab89ed7f
|
|
BLAKE2b-256 checksum How to use checksums |
6f3a5d50c3387586bdcaf0adbef6e75a6c11ff21e59fd52b4b05e7aaaa4d3509
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2025.
Transparency logSecurity for async-progressbar 0.1.2
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.
Full provenance
All 1 file in this release has been uploaded with provenance metadata.
Attestation for async_progressbar-0.1.2-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 19, 2025.
Transparency logA 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.