Skip to main content

A simple abstraction for computing and formatting time estimates.

Project description

ETA Utility

A simple abstraction for computing and formatting time estimates.

Basic Usage

from etautil import Eta

item_count = 10000

print(f"Processing {item_count} items...")

eta = Eta(item_count)  # Starts keeping time now
for item in range(item_count):
    print(eta.get_progress_string(item))  # Print the current progress stats
    ...  # Do something

print(f"Done processing {item_count} items in {eta.get_time_taken_string()}!\n")

Here is an example of the sort of output this produces:

...
1.59% | 38M:43S | 3:34:32 PM
1.60% | 38M:43S | 3:34:32 PM
1.61% | 38M:43S | 3:34:32 PM
1.61% | 38M:42S | 3:34:32 PM
1.62% | 38M:42S | 3:34:32 PM
1.63% | 38M:42S | 3:34:32 PM
1.64% | 38M:42S | 3:34:32 PM
1.65% | 38M:42S | 3:34:32 PM
1.65% | 38M:42S | 3:34:32 PM
1.66% | 38M:42S | 3:34:32 PM
...

You can get more verbose information by doing:

eta = Eta(item_count, verbose=True)

Here is an example of the verbose output:

...
2.10% (264/12518) | Time remaining: 39 minutes and 25 seconds | ETA: 3:40:33 PM
2.11% (265/12518) | Time remaining: 39 minutes and 25 seconds | ETA: 3:40:33 PM
2.12% (266/12518) | Time remaining: 39 minutes and 25 seconds | ETA: 3:40:33 PM
2.13% (267/12518) | Time remaining: 39 minutes and 24 seconds | ETA: 3:40:33 PM
2.13% (268/12518) | Time remaining: 39 minutes and 24 seconds | ETA: 3:40:33 PM
2.14% (269/12518) | Time remaining: 39 minutes and 24 seconds | ETA: 3:40:33 PM
2.15% (270/12518) | Time remaining: 39 minutes and 23 seconds | ETA: 3:40:32 PM
2.16% (271/12518) | Time remaining: 39 minutes and 23 seconds | ETA: 3:40:32 PM
2.17% (272/12518) | Time remaining: 39 minutes and 23 seconds | ETA: 3:40:32 PM
2.17% (273/12518) | Time remaining: 39 minutes and 23 seconds | ETA: 3:40:32 PM
...

Each individual property and text field is accessible via public methods.

Full Documentation

TODO

function()

Description

Returns: A type object

  • param [required]
    • Description
    • Type
    • Valid values

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

etautil-2.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

etautil-2.1.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file etautil-2.1.0.tar.gz.

File metadata

  • Download URL: etautil-2.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for etautil-2.1.0.tar.gz
Algorithm Hash digest
SHA256 291a550a6aaf8d051ee62d8e2ebddc0988c9537070f3a6eba5d2b627627bbe71
MD5 920a5002d8c5f0b73541c0e30b2fcdcc
BLAKE2b-256 b95cf62b3d6f079c879eb74fc207d97a0297388f48fbf1aaf081509973bc963b

See more details on using hashes here.

File details

Details for the file etautil-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: etautil-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for etautil-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae79aa79999a6f2a0864039a7def77a3dc93b1efa27f2ad2ecf27a0de49008b8
MD5 17df6304bc287f34c1da28ad131455da
BLAKE2b-256 2adbef89c1aac4dd460be151ddd0b84a7ae670ada48d7eb48a37262f43af4991

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