Skip to main content

GitHub license GitHub repo size GitHub repo size

Kleen-Timer

Simple python library that handle execution time of a script and display the result in many way.

Table of contents

Installation

You can install the module via pip :
pip install kleentimer

or via wheel file From PyPi :

pip install wheel
python -m wheel install wheel_file.whl

Documentation

The aim of kleentimer is to make it simple for the user to get a script made timer.
First import it to your script :

from kleentimer import kleentimer

Then you can setup the format that will be displayed at the end of the execution :

  • You got three usable variables (those are not mandatory, you can print only secondes and minutes and all possibility like that)
    • hours
    • minutes
    • secondes
kleentimer.init_timer("The script run for {hours}h {minutes}min and {secondes}sec")

When you want to set the start of your script you can use the function start_timer()

kleentimer.start_timer()

And when you want to stop the timer simply call end_timer()

kleentimer.end_timer()

Then the function elapsed_time() return the string formatted with the right formatting

output = kleentimer.elapsed_time()
print(output)
>> The script run for 0h 10min and 20sec

Release files for KleenTimer 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for KleenTimer 0.1.3
File Size Uploaded
KleenTimer-0.1.3.tar.gz 2.8 kB Details

Release files / KleenTimer-0.1.3.tar.gz

Download URL KleenTimer-0.1.3.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1690763b9997b9613fca4fe342f988d3549e6ebdca26a713163b70cb4c6a639c
BLAKE2b-256 checksum
How to use checksums
5a525cae496574d137d4450c705d3fbe6ef67bf25d69a5891af7c7b3e8cea295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page