A progress tracker with methods for throughput, ETA and update notification.
Class CheckPoint
MRO: builtins.tuple
CheckPoint(time, position)
Class Progress
A progress counter to track task completion with various utility methods.
P = Progress(name="example") P #doctest: +ELLIPSIS Progress(name='example',start=0,position=0,start_time=...,thoughput_window=None,total=None):[CheckPoint(time=..., position=0)] P.advance(5) P #doctest: +ELLIPSIS Progress(name='example',start=0,position=5,start_time=...,thoughput_window=None,total=None):[CheckPoint(time=..., position=0), CheckPoint(time=..., position=5)] P.total = 100 P #doctest: +ELLIPSIS Progress(name='example',start=0,position=5,start_time=...,thoughput_window=None,total=100):[CheckPoint(time=..., position=0), CheckPoint(time=..., position=5)]
A Progress instance has an attribute notify_update which
is a set of callables. Whenever the position is updates, each
of these will be called with the Progress instance and the
latest CheckPoint.
Progress objects also make a small pretense of being an integer.
The expression int(progress) returns the current position,
and += and -= adjust the position.
This is convenient for coding, but importantly it is also important for discretionary use of a Progress with some other object. If you want to make a lightweight Progress capable class you can set a position attribute to an int and manipulate it carefully using += and -= entirely. If you decide to incur the cost of maintaining a Progress object you can slot it in:
# initial setup with just an int
my_thing.amount = 0
# later, or on some option, use a Progress instance
my_thing.amount = Progress(my_thing.amount)
Metadata
Release files for cs-progress 20190220
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cs.progress-20190220.tar.gz | 5.2 kB | Without provenance | Details for cs.progress-20190220.tar.gz |
Release files / cs.progress-20190220.tar.gz
| Download URL | cs.progress-20190220.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec91497cd32c8804f59d6f4f51f5bb1dd57821fd8d4e859f91a24ad3056dabe5
|
|
BLAKE2b-256 checksum How to use checksums |
dc36504b8c5fb4d46e2511ef0819146dd2da0542e6696c190fe3fd362f679565
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.8
|
Security for cs-progress 20190220
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.