Flet Timer v2.0.0
flet-chrono is a small toolkit for anything time-related in Python and Flet:
- Plain timers — an interruptible, drift-corrected repeating
Timer, plusdebounceandthrottledecorators. No Flet required. - Flet widgets — drop-in
Clock,Countdown,Stopwatch,ProgressTimer, andPomodorocontrols.
🎬 Video Demos
Flet Chrono Full Demo
Installation
pip install flet-chrono
Core — Timer, debounce, throttle
Timer
from flet_chrono import Timer
t = Timer(1.0, lambda: print("tick"))
t.start()
# ...
t.pause()
t.resume()
t.stop()
Lifecycle: on_start, on_stop, on_pause, on_resume, on_error.
One-shots: Timer.after(2.0, fn). Delays: Timer.delay(5.0).
Context manager: with Timer(0.5, fn) as t: ....
debounce / throttle
from flet_chrono import debounce, throttle
@debounce(0.3, max_wait=2.0)
def save(query): ...
@throttle(1.0)
def on_scroll(dy): ...
Both detect async def and dispatch through the running event loop. Both expose .cancel(), .flush(), .pending.
Widgets
Clock — live wall clock
from flet_chrono.widgets import Clock
Clock(fmt="%H:%M:%S", interval=1.0, size=32)
Countdown — countdown with hooks
from flet_chrono.widgets import Countdown
cd = Countdown(
duration=5 * 60,
fmt="%M:%S",
on_complete=lambda: print("done!"),
auto_start=False,
)
# cd.start() / cd.pause() / cd.resume() / cd.reset()
Stopwatch — count up with laps
from flet_chrono.widgets import Stopwatch
sw = Stopwatch(fmt="%M:%S.%c", on_lap=lambda split: print("lap:", split))
sw.start()
sw.lap()
sw.pause()
ProgressTimer — countdown in a ring
from flet_chrono.widgets import ProgressTimer
ProgressTimer(duration=60, size=140, stroke_width=8)
Pomodoro — work/break cycle
from flet_chrono.widgets import Pomodoro
Pomodoro(
work=25 * 60,
short_break=5 * 60,
long_break=15 * 60,
rounds=4,
on_phase_change=lambda phase, rnd: print(phase, rnd),
)
Full example
import flet as ft
from flet_chrono.widgets import Clock, Countdown, Stopwatch, ProgressTimer
def main(page: ft.Page):
page.title = "flet-chrono demo"
page.add(
Clock(size=28),
Countdown(60, on_complete=lambda: print("done")),
Stopwatch(fmt="%M:%S.%c"),
ProgressTimer(120),
)
ft.run(main)
Formatting durations
The widgets and format_duration() share a small DSL:
| Token | Meaning |
|---|---|
%D |
days |
%H |
hours (days folded in) |
%M |
minutes (0–59) |
%S |
seconds (0–59) |
%L |
milliseconds |
%c |
centiseconds |
from flet_chrono import format_duration
format_duration(3725.5, "%H:%M:%S") # '01:02:05'
format_duration(3725.5, "%M:%S") # '02:05' (minutes wrap at 60)
Metadata
Release files for flet-chrono 2.0.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 |
|---|---|---|---|---|
| flet_chrono-2.0.0.tar.gz | 16.8 kB | With provenance | Details for flet_chrono-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flet_chrono-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for flet_chrono-2.0.0-py3-none-any.whl |
Total release size: 38.1 kB
Release files / flet_chrono-2.0.0.tar.gz
| Download URL | flet_chrono-2.0.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89962f48b2a1974c6fb835cb433cf69b3552f311e36dfcfd36fc60d3586bab1a
|
|
BLAKE2b-256 checksum How to use checksums |
944d24668adb87492d7d19e00b6ece6f33716f43b87400693223ae5fd95f6d27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logRelease files / flet_chrono-2.0.0-py3-none-any.whl
| Download URL | flet_chrono-2.0.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b89fca2e8c69fd62b7f6d620236355b2ec4fcd6b6cd6b42980adfecbb4feb158
|
|
BLAKE2b-256 checksum How to use checksums |
ca8656adb4005e4b37788891ba18e56ae1fe548396a7cae5caa5ebecea661a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logSecurity for flet-chrono 2.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flet_chrono-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logA 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.