Skip to main content

Make iterators yield progress

Project description

progresso

progresso Python Versions License CI

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


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 details)

Uploaded Source

Built Distribution

progresso-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file progresso-0.1.0.tar.gz.

File metadata

  • Download URL: progresso-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for progresso-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f589a2ddfb4af320ea0a1a53c8f62100f3d5fd6979a14f533b9ab60e672ad61e
MD5 67cc5bfa9f7a7462a8562c0c93b7208b
BLAKE2b-256 97d6b11c7c5f73c4bfc503fa8a7c88e6ab57e6cf7d76e4b07d8d949b680e37c7

See more details on using hashes here.

File details

Details for the file progresso-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: progresso-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for progresso-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 728f24bf64ac14a2176cb074b11cb2a12519bc96914781b63d608841b7ccfa94
MD5 70e9425ef7fd2199ff9329e9f8b1447d
BLAKE2b-256 35a13814c159268e38ede5a32d8d948ed77927805b30baa34fd8dc23e83e84d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page