tktimer
tktimer is a set of tkinter widgets including a Stopwatch widget and a Countdown widget.
Installing
$ pip install tktimer
Usage
The timers have two methods: start() and pause().
You can find example programs in examples/.
Available options:
| option | description | default |
|---|---|---|
parent |
set the parent widget. | |
prefix |
set text before timer value. | "" |
suffix |
set text after timer value. | "" |
unit |
set the unit (available: second, minute, hour, day, week, year). |
second |
beginning |
set starting point (in seconds). specific to Countdown. |
10 |
update_every |
set updating time every X milliseconds. | 10 |
precision |
set counting precision (number of digits after the decimal point). | 2 |
offset |
set time offset (in seconds). specific to Stopwatch. |
10 |
FAQ
How can I continue the timer after restarting my app?
You can get the elapsed time (in seconds) with timer.value.get() on exit and set offset later on, which will make the timer start counting from offset. For Countdown, tweak beginning instead of offset.
I'm not happy with how my timer looks like. Can I change its appearance?
Yes, timers are ultimately just tkinter labels which means you can do anything you would to an ordinary tkinter.Label.
Licensing
Licensed under the MIT License. For details, see LICENSE.
Metadata
Release files for tktimer 0.1.0
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 |
|---|---|---|---|---|
| tktimer-0.1.0.tar.gz | 3.5 kB | Without provenance | Details for tktimer-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tktimer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tktimer-0.1.0-py3-none-any.whl |
Total release size: 7.2 kB
Release files / tktimer-0.1.0.tar.gz
| Download URL | tktimer-0.1.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20ed6ebc9f413df63619e1ecac39d6f441e67607c672e66dfc050b05dacb071f
|
|
BLAKE2b-256 checksum How to use checksums |
6a479c288881815614a4cb088f1130c2e332fa5171f301f2fdd07c059c42d964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-56-generic
|
Release files / tktimer-0.1.0-py3-none-any.whl
| Download URL | tktimer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5f7ab0567cc9df75beaf26a01c34607258c0e0875708fba3ab80295d979e6e3
|
|
BLAKE2b-256 checksum How to use checksums |
9491895e80ba49fc7913c7607979d07de983f3a25f02ab1d10c092ed1321af9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-56-generic
|
Security for tktimer 0.1.0
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.