{"id":23071506,"url":"https://github.com/omamkaz/flet-timer","last_synced_at":"2025-04-03T10:41:37.768Z","repository":{"id":266890862,"uuid":"899657225","full_name":"omamkaz/flet-timer","owner":"omamkaz","description":"It demonstrates how to create a countdown timer using threading for real-time display updates.","archived":false,"fork":false,"pushed_at":"2025-01-24T23:15:17.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T00:14:35.379Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omamkaz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T18:15:35.000Z","updated_at":"2025-01-17T22:06:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"a183addd-524d-4ea0-a768-639a65ecf473","html_url":"https://github.com/omamkaz/flet-timer","commit_stats":null,"previous_names":["omamkaz/flet-timer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omamkaz%2Fflet-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omamkaz%2Fflet-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omamkaz%2Fflet-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omamkaz%2Fflet-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omamkaz","download_url":"https://codeload.github.com/omamkaz/flet-timer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246989490,"owners_count":20865304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T07:15:25.873Z","updated_at":"2025-04-03T10:41:37.724Z","avatar_url":"https://github.com/omamkaz.png","language":"Python","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Flet Timer v1.0.2\n \nThe `Timer` is a timer class\nIt demonstrates how to create a countdown timer using threading for real-time display updates.\n\n## Features\n\n- Countdown Timer: Implements a dynamic countdown.\n- Real-Time Updates: Displays updates in real time.\n- Threading: Uses threading for non-blocking execution.\n\n## Installation\nYou can install Flet Timer using pip:\n\n```bash\npip install git+https://github.com/omamkaz/flet-timer.git\n```\n\n## Usage\n\nHere's an example that demonstrates how to use the `Timer` and `debounce`.\n\n### debounce\n```python\nfrom flet_timer import debounce\n\n\n@debounce(0.3)\ndef func(*args, **kwargs) -\u003e None:\n    print(\"Hi...\")\n```\n\n### Timer\n```python\nimport flet as ft\nfrom flet_timer import Timer\nfrom datetime import datetime\n\n\ndef main(page: ft.Page):\n    page.title = \"Timer Example 1\"\n    page.vertical_alignment = ft.MainAxisAlignment.CENTER\n    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER\n\n    page.window.width = 360\n    page.window.height = 600\n\n\n    def update_time():\n        timer_txt.value = datetime.now().strftime(\"%H:%M:%S\")\n        page.update()\n\n\n    timer = Timer(callback=update_time)\n\n    timer_txt = ft.Text(\n        value=datetime.now().strftime(\"%H:%M:%S\"), \n        text_align=\"center\",\n        size=24\n    )\n\n    page.add(\n        timer_txt,\n        ft.Button(\n            text = \"Start\",\n            on_click=lambda e: timer.start()\n        ),\n        ft.Button(\n            text = \"Stop\",\n            on_click=lambda e: timer.stop()\n        ),\n        ft.Button(\n            text = \"Pause\",\n            on_click=lambda e: timer.pause()\n        ),\n        ft.Button(\n            text = \"Resume\",\n            on_click=lambda e: timer.resume()\n        )\n    )\n\nft.app(target=main)\n```\n\n## Output of above code\n\n![Example 1](media/example_1.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomamkaz%2Fflet-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomamkaz%2Fflet-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomamkaz%2Fflet-timer/lists"}