A tqdm multi-thread helper
example
import threading
from concurrent.futures import ThreadPoolExecutor
import time
from tqdm_multi_thread import TqdmMultiThreadFactory
def demo(factory, position, total):
with factory.create(position, total) as progress:
for _ in range(0, total, 5):
progress.update(5)
time.sleep(0.001 * (position % 5 + 1))
with ThreadPoolExecutor(max_workers=20) as executor:
tasks = range(100)
multi_thread_factory = TqdmMultiThreadFactory()
for i, url in enumerate(tasks, 1):
executor.submit(demo, multi_thread_factory, i, 100)
Metadata
Release files for tqdm-multi-thread 0.7
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 |
|---|---|---|---|---|
| tqdm_multi_thread-0.7-py3-none-any.whl | Python 3 | none | any | Details |
Release files / tqdm_multi_thread-0.7-py3-none-any.whl
| Download URL | tqdm_multi_thread-0.7-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81a3465d0011b6425f19a9079149e6198737182be68ba955a81f3133beab091a
|
|
BLAKE2b-256 checksum How to use checksums |
64b0508c0ff437fabcdcb0d80a0f0238513922cabfdb9fb8b0f607f3ae95eb0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
|