{"id":21127007,"url":"https://github.com/pyrustic/tkf","last_synced_at":"2025-10-17T03:01:30.939Z","repository":{"id":57475850,"uuid":"428742981","full_name":"pyrustic/tkf","owner":"pyrustic","description":"Tkinter-based framework to build Python apps","archived":false,"fork":false,"pushed_at":"2022-03-21T20:42:44.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-05T18:36:02.783Z","etag":null,"topics":["app","dark-theme","desktop-app","framework","gui","multithreading","productivity","pyrustic","python","style","theme","tkinter"],"latest_commit_sha":null,"homepage":"https://pyrustic.github.io","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/pyrustic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-16T17:01:04.000Z","updated_at":"2024-06-26T12:35:52.000Z","dependencies_parsed_at":"2022-09-07T13:51:48.060Z","dependency_job_id":null,"html_url":"https://github.com/pyrustic/tkf","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pyrustic/tkf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Ftkf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Ftkf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Ftkf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Ftkf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrustic","download_url":"https://codeload.github.com/pyrustic/tkf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrustic%2Ftkf/sbom","scorecard":{"id":751941,"data":{"date":"2025-08-11","repo":{"name":"github.com/pyrustic/tkf","commit":"a25f932799a0c42dc2bbb48cdf38b39ea559e6b9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T20:37:35.975Z","repository_id":57475850,"created_at":"2025-08-22T20:37:35.975Z","updated_at":"2025-08-22T20:37:35.975Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279275043,"owners_count":26138541,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["app","dark-theme","desktop-app","framework","gui","multithreading","productivity","pyrustic","python","style","theme","tkinter"],"created_at":"2024-11-20T04:46:14.648Z","updated_at":"2025-10-17T03:01:30.869Z","avatar_url":"https://github.com/pyrustic.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This project is deprecated. Please use [Gaspium](https://github.com/pyrustic/gaspium) instead. Gaspium is a better framework for a lot of reasons**\n\n\u003cbr\u003e\u003cbr\u003e\n\n\u003c!-- Cover --\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/assets/tkf/cover.png\" alt=\"Figure\" width=\"970\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n# TkF\n**Lightweight Tkinter-based framework to build Python apps**\n\nThis project is part of the [Pyrustic Open Ecosystem](https://pyrustic.github.io).\n\n[Installation](#installation) | [Documentation](https://github.com/pyrustic/tkf/tree/master/docs/modules#readme) | [Latest](https://github.com/pyrustic/tkf/tags)\n\n**Table of contents**\n- [Overview](#overview)\n- [Demo](#demo)\n- [Installation](#installation)\n- [External learning resources](#external-learning-resources)\n- [Gaspium](#gaspium)\n\n# Overview\nThis package includes several other packages and above all exposes `tkf.App`, the main class of the framework.\n\n## Main class\nThe main class `tkf.App` allows you to:\n- display the first view of the application;\n- activate the theme of your choice;\n- define the width and height of the app window;\n- center the application window on the screen;\n- make the application window full screen;\n- restart the application;\n- stop the application;\n- et cetera.\n\n### Example\nThis is an example of usage of `tkf.App`:\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand or collapse \u003c/summary\u003e\n\n```python\nimport tkinter as tk\nfrom tkf import App\nfrom cyberpunk_theme import Cyberpunk\n\n\ndef get_view(app):\n    \"\"\"This is a view function\"\"\"\n    root = app.root\n    # Body\n    body = tk.Frame(root)\n    # Label 'Hello Friend'\n    label = tk.Label(body, text=\"Hello Friend\")\n    label.pack(pady=10)\n    # Button 'Quit'\n    button = tk.Button(body, text=\"Quit\", command=app.exit)\n    button.pack(pady=10)\n    # Return the body of this view\n    return body\n\n\n# An instance of tkf.App\napp = App()\n\n# Size\napp.geometry = \"300x100\"\n\n# Title\napp.title = \"Example\"\n\n# Cyberpunk is a dark theme\napp.theme = Cyberpunk()\n\n# A view is either a function that returns a Tkinter widget\n# or a Viewable (see the library Viewable)\napp.view = get_view\n\n# Center the window on the screen\napp.center()\n\n# Start the app (mainloop !)\napp.start()\n\n\n```\n\n\u003c/details\u003e\n\nAnd this is what it looks like:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/assets/tkf/example.png\" alt=\"Figure\" width=\"314\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Example \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003e Read more about the class [tkf.App](https://github.com/pyrustic/tkf/blob/master/docs/modules/content/tkf.__init__/classes.md).\n\n\n## Batteries included\nThese are the packages included in TkF:\n\n### Libraries\n|Name | Description|\n|---|---|\n|[Shared](https://github.com/pyrustic/shared) |  Library to store, expose, read, and edit `collections` of data|\n|[TkStyle](https://github.com/pyrustic/tkstyle) | Library to create `styles` and `themes` for Python apps|\n|[Litemark](https://github.com/pyrustic/litemark) | Lightweight `Markdown` dialect for Python apps|\n|[Megawidget](https://github.com/pyrustic/megawidget) | Collection of `megawidgets` to build graphical user interfaces for Python apps|\n|[Viewable](https://github.com/pyrustic/viewable) | Class to implement a GUI view with `lifecycle`|\n|[Threadom](https://github.com/pyrustic/threadom) | Tkinter-compatible `multithreading`|\n|[Suggestion](https://github.com/pyrustic/suggestion) | Democratizing `auto-complete`(suggest) for Python desktop applications|\n|[Kurl](https://github.com/pyrustic/kurl) | Konnection URL: `HTTP requests` in Python with an implementation of `conditional request` and a `responses caching` system|\n|[Litedao](https://github.com/pyrustic/litedao) | Library to perform intuitive interaction with `SQLite` database|\n|[Probed](https://github.com/pyrustic/probed) | Probed `collections` for Python|\n\n\u003e **Note**: The libraries listed above can be downloaded from `PyPI` and installed individually for use as is in new or existing projects without having to use the `TkF` framework.\n\n### Themes\n|Name | Description|\n|---|---|\n|[Cyberpunk-Theme](https://github.com/pyrustic/cyberpunk-theme) | A modern `dark theme` for Python apps|\n|[Winter-Theme](https://github.com/pyrustic/winter-theme) | A modern `light theme` for Python apps|\n\n\u003e **Note**: The themes listed above can be downloaded from `PyPI` and installed individually for use as is in new or existing projects without having to use the `TkF` framework.\n\n### Command line tools\n|Name | Description|\n|---|---|\n|[Backstage](https://github.com/pyrustic/backstage) | `CLI` tool to manage, test, build, and release your Python `projects`|\n\n\u003e **Note**: The tools listed above can be downloaded from `PyPI` and installed individually for use as is in new or existing projects without having to use the `TkF` framework.\n\n# Demo\nHere is a demo that you can copy and paste and run as is:\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to expand or collapse \u003c/summary\u003e\n\n```python\nimport tkinter as tk\nfrom tkf import App\nfrom viewable import Viewable\nfrom megawidget import Toast\nfrom cyberpunk_theme import Cyberpunk\nfrom cyberpunk_theme.widget.button import get_button_red_style, get_button_blue_style\n\n\nclass Hello(Viewable):\n    \"\"\"Graphical equivalent of a Hello World\"\"\"\n    def __init__(self, app):\n        super().__init__()\n        self._app = app\n        self._root = app.root\n        self._btn_max = None\n\n    def _build(self):\n        \"\"\"This method is part of the view lifecycle\"\"\"\n        self._body = tk.Frame(self._root)\n        self._root.geometry(\"500x300\")\n        # Label\n        label = tk.Label(self._body, text=\"Hello Friend !\")\n        label.pack(expand=1, fill=tk.BOTH)\n        # Footer\n        footer = tk.Frame(self._body)\n        footer.pack(side=tk.BOTTOM, fill=tk.X, padx=2, pady=2)\n        # Button Maximize\n        self._btn_max = tk.Button(footer, text=\"Maximize\",\n                                  command=self._on_click_btn_max)\n        self._btn_max.pack(side=tk.RIGHT, padx=(2, 0))\n        # Button Crash\n        btn_crash = tk.Button(footer, text=\"Crash\",\n                              command=self._on_click_btn_crash)\n        btn_crash.pack(side=tk.RIGHT)\n        # Styling\n        button_red_style = get_button_red_style()\n        button_blue_style = get_button_blue_style()\n        button_red_style.target(btn_crash)\n        button_blue_style.target(self._btn_max)\n\n    def _on_click_btn_max(self):\n        self._app.maximize()\n        self._btn_max.destroy()\n\n    def _on_click_btn_crash(self):\n        toast = Toast(self._body, message=\"This app is going to crash...\")\n        toast.wait_window()\n        self._app.crash_resistant = False\n        raise Exception(\"Deliberately raised exception !\")\n\n\ndef main():\n    # The App\n    app = App()\n    # Set the title\n    app.title = \"demo\"\n    # Resizable\n    app.resizable = (True, True)\n    # Set the theme\n    app.theme = Cyberpunk()\n    # Set the view\n    app.view = Hello\n    # Center the window on the screen\n    app.center()\n    # Lift off !\n    app.start()\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\n\n\u003c/details\u003e\n\nAnd this is what it looks like:\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pyrustic/misc/master/assets/tkf/demo.png\" alt=\"Figure\" width=\"514\"\u003e\n    \u003cp align=\"center\"\u003e\n    \u003ci\u003e Demo \u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n\n# Installation\n`TkF` is `cross platform` and versions under `1.0.0` will be considered `Beta` at best. It is built on [Ubuntu](https://ubuntu.com/download/desktop) with [Python 3.8](https://www.python.org/downloads/) and should work on `Python 3.5` or newer.\n\n## For the first time\n\n```bash\npip install tkf\n```\n\n## Upgrade\n```bash\n$ pip install tkf --upgrade --upgrade-strategy eager\n\n```\n\n\n# External learning resources\nSome interesting links below to get started with `Python`, `Tkinter` and `SQLite`.\n\n## Introduction to Python\n- [python-guide](https://docs.python-guide.org/intro/learning/)\n- [python tutorial](https://www.python-course.eu/python3_course.php)\n- freeCodeCamp on [Youtube](https://www.youtube.com/watch?v=rfscVS0vtbw)\n\n## Introduction to Tkinter\n- [tkdocs](https://tkdocs.com/)\n- [tkinter tutorial](https://www.python-course.eu/python_tkinter.php)\n- freeCodeCamp on [Youtube](https://www.youtube.com/watch?v=YXPyB4XeYLA)\n\n## Introduction to SQLite\n- [sqlitetutorial](https://www.sqlitetutorial.net/)\n- freeCodeCamp on [Youtube](https://www.youtube.com/watch?v=byHcYRpMgI4)\n\n`Note:` I am not affiliated with any of these entities. A simple web search brings them up.\n\n# Gaspium\n`Gaspium` is a high-productivity framework for building [GASP](https://github.com/pyrustic/gaspium/blob/master/docs/whitepaper.md) applications. Under the hood, `Gaspium` uses `TkF`. If `TkF` is C, `Gaspium` would be Python.\n\nDiscover [Gaspium](https://github.com/pyrustic/gaspium) !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrustic%2Ftkf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrustic%2Ftkf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrustic%2Ftkf/lists"}