Skip to main content

Time Till Done (ttd) is a simple progress bar for your long running Python scripts

Project description

Time Till Done (ttd)
-------------------

.. image:: https://travis-ci.org/JarrodCTaylor/ttd.svg?branch=master
:target: https://travis-ci.org/JarrodCTaylor/ttd

Time Till Done ``ttd`` for short is a simple progress bar to help give you some
feedback for your long running Python scripts.

Installation
============

``pip install ttd``

Demo Gif
========
.. image:: https://cloud.githubusercontent.com/assets/4416952/3593813/177b9caa-0c8e-11e4-9e6d-87340fe43bd1.gif

Usage
=====

The easiest way to use the module is in a for loop as demonstrated in the demo
gif above and the code snippet below.

.. code:: python

import time
from ttd import ttd

for i in ttd(range(99)):
time.sleep(.05)

You may also update the progress bar manually by calling ``print_ttd(index, total)``
throughout your script as demonstrated below.

.. code:: python

import time
from ttd import print_ttd

print_ttd(0, 5)
time.sleep(.5)

print_ttd(1, 5)
time.sleep(.04)

print_ttd(2, 5)
time.sleep(.5)

print_ttd(3, 5)
time.sleep(.5)

print_ttd(4, 5)
time.sleep(.5)

print_ttd(5, 5)
print("\ndone")

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

ttd-0.1.0.tar.gz (1.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: ttd-0.1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ttd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8902cfd54504aa01982a857316bea271e696ce593fb0f67b3d0018dd63d4bacb
MD5 8cca853caa4bba54aca21bddebe5b675
BLAKE2b-256 6be49156d59a5a2616d441e2928805690601d10e60b4dcabfdbc9b93fe405a61

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