Make iterators yield progress
Project description
progresso
A simple library that aims at making hierarchical progress iterators / generators easy.
A single point API: progresso(it: Iterable, start: float = 0, end: float = 100) -> Iterable
Example:
>>> def task_1():
... yield 10
... yield 90
... yield 100
...
>>> def task_2():
... yield 5
... yield 2
... yield 99
...
>>> def task():
... yield 30
... yield from progresso(task_1(), 30, 60)
... yield from progresso(task_2(), 60, 90)
>>> for i in progresso(task()):
... print(i)
30.0
33.0
57.0
60.0
61.5
89.7
90.0
100.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
progresso-0.1.0.tar.gz
(15.6 kB
view hashes)
Built Distribution
progresso-0.1.0-py3-none-any.whl
(15.3 kB
view hashes)
Close
Hashes for progresso-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 728f24bf64ac14a2176cb074b11cb2a12519bc96914781b63d608841b7ccfa94 |
|
MD5 | 70e9425ef7fd2199ff9329e9f8b1447d |
|
BLAKE2b-256 | 35a13814c159268e38ede5a32d8d948ed77927805b30baa34fd8dc23e83e84d8 |