tkface


Nametkface JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryA comprehensive multilingual GUI extension library for Tkinter with enhanced message boxes, and Windows-specific features
upload_time2025-07-21 15:47:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT
keywords tkinter gui multilingual internationalization messagebox dialog windows
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tkface
[![License: MIT](https://img.shields.io/pypi/l/tkface)](https://opensource.org/licenses/MIT)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tkface)](https://pypi.org/project/tkface)
[![GitHub Release](https://img.shields.io/github/release/mashu3/tkface?color=orange)](https://github.com/mashu3/tkface/releases)
[![PyPi Version](https://img.shields.io/pypi/v/tkface?color=yellow)](https://pypi.org/project/tkface/)
[![Downloads](https://static.pepy.tech/badge/tkface)](https://pepy.tech/project/tkface)

**Restore the "face" to your Tkinter!**

A multilingual GUI extension library for Tkinter (tkinter) - bringing back the "face" (interface) that Tkinter left behind.

---

## 📖 Overview

Tkface is a Python library designed to restore and enhance the "face" (user interface) of Tkinter. While Tkinter is a powerful toolkit, its dialogs and user-facing components are minimal and lack friendly interfaces. Tkface fills this gap with multilingual dialogs, advanced message boxes, and Windows-specific features.

- **Completing the Interface**: Tkinter stands for "Tk **inter**face," providing a powerful core for building GUIs. Tk**face** is designed to complement it by providing the user-facing components—the "**face**"—that are essential for a polished user experience but not built into the standard library. It extends Tkinter with ready-to-use, multilingual dialogs and widgets, letting you build sophisticated, user-friendly applications with less effort.
- **Vibe Coding**: Developed with a "Vibe Coding" approach-prioritizing developer joy, rapid prototyping, and a sense of fun. The codebase is hackable, readable, and easy to extend—and so is this document.

---

## 🔧 Requirements

- Python 3.7+
- Tkinter (included with Python)
- No additional dependencies

---

## 📦 Installation

Install the latest version from PyPI:

```bash
pip install tkface
```

Or install from the GitHub repository for the latest changes:

```bash
pip install git+https://github.com/mashu3/tkface.git
```

---

## 🚀 Usage

### Message Boxes

```python
from tkface import messagebox

# Simple information dialog
messagebox.showinfo("Success", "Operation completed successfully!")

# Multilingual support
messagebox.showerror("Error", "An error has occurred!", language="ja")

# Confirmation dialog
if messagebox.askyesno("Confirm", "Do you want to save?"):
    save_file()
```

### Input Dialogs

```python
from tkface import simpledialog

# String input
name = simpledialog.askstring("Name", "Enter your name:")

# Integer input with validation
age = simpledialog.askinteger("Age", "Enter your age:", minvalue=0, maxvalue=120)
```

### Windows-Specific Features

```python
import tkinter as tk
from tkface import win

root = tk.Tk()
win.dpi()         # Enable DPI awareness (Windows only)
win.unround(root) # Disable corner rounding (Windows 11 only)
root.mainloop()
```

### Language Management

```python
from tkface import lang
import tkinter as tk

root = tk.Tk()
lang.set("ja", root)  # Set language manually
lang.set("auto", root)  # Auto-detect system language

# Register custom translations
custom_translations = {
    "ja": {
        "Custom Message": "カスタムメッセージ",
        "Custom Button": "カスタムボタン"
    }
}
from tkface import messagebox
messagebox.showinfo(
    "Custom Message",
    "This will be translated",
    custom_translations=custom_translations,
    language="ja"
)
```

---

## 🧩 Features

- **Multilingual Support**: Automatic language detection, English/Japanese built-in, custom dictionaries
- **Enhanced Message Boxes**: All standard and advanced dialogs, custom positioning, keyboard shortcuts, tab navigation
- **Enhanced Input Dialogs**: String/integer/float input, validation, password input, custom positioning
- **Windows Features**: DPI awareness, Windows 11 corner rounding control (no-ops on other OS)

---

## 📁 Examples

See the `examples/` directory for complete working examples:

- `demo_messagebox.py` - Message box demonstrations
- `demo_simpledialog.py` - Input dialog demonstrations

> **Note**: Test files are not included in the public release. For testing, see the development repository.

---

## 🌐 Supported Languages

- **English (en)**: Default, comprehensive translations
- **Japanese (ja)**: Complete Japanese translations

You can add support for any language by providing translation dictionaries:

```python
custom_translations = {
    "fr": {
        "ok": "OK",
        "cancel": "Annuler",
        "yes": "Oui",
        "no": "Non",
        "Error": "Erreur",
        "Warning": "Avertissement"
    }
}
```

---

## 📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

---

## 👨‍💻 Author
[mashu3](https://github.com/mashu3)

[![Authors](https://contrib.rocks/image?repo=mashu3/tkface)](https://github.com/mashu3/tkface/graphs/contributors)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tkface",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "tkinter, gui, multilingual, internationalization, messagebox, dialog, windows",
    "author": null,
    "author_email": "mashu3 <your.email@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/2a/df/577197823f55c0596a454e5802bc99948313d2d1f451ec1cd0419e7681b8/tkface-0.0.2.tar.gz",
    "platform": null,
    "description": "# Tkface\n[![License: MIT](https://img.shields.io/pypi/l/tkface)](https://opensource.org/licenses/MIT)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tkface)](https://pypi.org/project/tkface)\n[![GitHub Release](https://img.shields.io/github/release/mashu3/tkface?color=orange)](https://github.com/mashu3/tkface/releases)\n[![PyPi Version](https://img.shields.io/pypi/v/tkface?color=yellow)](https://pypi.org/project/tkface/)\n[![Downloads](https://static.pepy.tech/badge/tkface)](https://pepy.tech/project/tkface)\n\n**Restore the \"face\" to your Tkinter!**\n\nA multilingual GUI extension library for Tkinter (tkinter) - bringing back the \"face\" (interface) that Tkinter left behind.\n\n---\n\n## \ud83d\udcd6 Overview\n\nTkface is a Python library designed to restore and enhance the \"face\" (user interface) of Tkinter. While Tkinter is a powerful toolkit, its dialogs and user-facing components are minimal and lack friendly interfaces. Tkface fills this gap with multilingual dialogs, advanced message boxes, and Windows-specific features.\n\n- **Completing the Interface**: Tkinter stands for \"Tk **inter**face,\" providing a powerful core for building GUIs. Tk**face** is designed to complement it by providing the user-facing components\u2014the \"**face**\"\u2014that are essential for a polished user experience but not built into the standard library. It extends Tkinter with ready-to-use, multilingual dialogs and widgets, letting you build sophisticated, user-friendly applications with less effort.\n- **Vibe Coding**: Developed with a \"Vibe Coding\" approach-prioritizing developer joy, rapid prototyping, and a sense of fun. The codebase is hackable, readable, and easy to extend\u2014and so is this document.\n\n---\n\n## \ud83d\udd27 Requirements\n\n- Python 3.7+\n- Tkinter (included with Python)\n- No additional dependencies\n\n---\n\n## \ud83d\udce6 Installation\n\nInstall the latest version from PyPI:\n\n```bash\npip install tkface\n```\n\nOr install from the GitHub repository for the latest changes:\n\n```bash\npip install git+https://github.com/mashu3/tkface.git\n```\n\n---\n\n## \ud83d\ude80 Usage\n\n### Message Boxes\n\n```python\nfrom tkface import messagebox\n\n# Simple information dialog\nmessagebox.showinfo(\"Success\", \"Operation completed successfully!\")\n\n# Multilingual support\nmessagebox.showerror(\"Error\", \"An error has occurred!\", language=\"ja\")\n\n# Confirmation dialog\nif messagebox.askyesno(\"Confirm\", \"Do you want to save?\"):\n    save_file()\n```\n\n### Input Dialogs\n\n```python\nfrom tkface import simpledialog\n\n# String input\nname = simpledialog.askstring(\"Name\", \"Enter your name:\")\n\n# Integer input with validation\nage = simpledialog.askinteger(\"Age\", \"Enter your age:\", minvalue=0, maxvalue=120)\n```\n\n### Windows-Specific Features\n\n```python\nimport tkinter as tk\nfrom tkface import win\n\nroot = tk.Tk()\nwin.dpi()         # Enable DPI awareness (Windows only)\nwin.unround(root) # Disable corner rounding (Windows 11 only)\nroot.mainloop()\n```\n\n### Language Management\n\n```python\nfrom tkface import lang\nimport tkinter as tk\n\nroot = tk.Tk()\nlang.set(\"ja\", root)  # Set language manually\nlang.set(\"auto\", root)  # Auto-detect system language\n\n# Register custom translations\ncustom_translations = {\n    \"ja\": {\n        \"Custom Message\": \"\u30ab\u30b9\u30bf\u30e0\u30e1\u30c3\u30bb\u30fc\u30b8\",\n        \"Custom Button\": \"\u30ab\u30b9\u30bf\u30e0\u30dc\u30bf\u30f3\"\n    }\n}\nfrom tkface import messagebox\nmessagebox.showinfo(\n    \"Custom Message\",\n    \"This will be translated\",\n    custom_translations=custom_translations,\n    language=\"ja\"\n)\n```\n\n---\n\n## \ud83e\udde9 Features\n\n- **Multilingual Support**: Automatic language detection, English/Japanese built-in, custom dictionaries\n- **Enhanced Message Boxes**: All standard and advanced dialogs, custom positioning, keyboard shortcuts, tab navigation\n- **Enhanced Input Dialogs**: String/integer/float input, validation, password input, custom positioning\n- **Windows Features**: DPI awareness, Windows 11 corner rounding control (no-ops on other OS)\n\n---\n\n## \ud83d\udcc1 Examples\n\nSee the `examples/` directory for complete working examples:\n\n- `demo_messagebox.py` - Message box demonstrations\n- `demo_simpledialog.py` - Input dialog demonstrations\n\n> **Note**: Test files are not included in the public release. For testing, see the development repository.\n\n---\n\n## \ud83c\udf10 Supported Languages\n\n- **English (en)**: Default, comprehensive translations\n- **Japanese (ja)**: Complete Japanese translations\n\nYou can add support for any language by providing translation dictionaries:\n\n```python\ncustom_translations = {\n    \"fr\": {\n        \"ok\": \"OK\",\n        \"cancel\": \"Annuler\",\n        \"yes\": \"Oui\",\n        \"no\": \"Non\",\n        \"Error\": \"Erreur\",\n        \"Warning\": \"Avertissement\"\n    }\n}\n```\n\n---\n\n## \ud83d\udcdd License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n---\n\n## \ud83d\udc68\u200d\ud83d\udcbb Author\n[mashu3](https://github.com/mashu3)\n\n[![Authors](https://contrib.rocks/image?repo=mashu3/tkface)](https://github.com/mashu3/tkface/graphs/contributors)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive multilingual GUI extension library for Tkinter with enhanced message boxes, and Windows-specific features",
    "version": "0.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/mashu3/tkface/issues",
        "Documentation": "https://github.com/mashu3/tkface#readme",
        "Homepage": "https://github.com/mashu3/tkface",
        "Repository": "https://github.com/mashu3/tkface"
    },
    "split_keywords": [
        "tkinter",
        " gui",
        " multilingual",
        " internationalization",
        " messagebox",
        " dialog",
        " windows"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "15352d21ea3fa3d540b42e323b84c21115daa0eeb262d0e0d568cfed7c374f38",
                "md5": "d89e00a01365b61230db412730ca0981",
                "sha256": "cfa901ce7aff10d922d115aff2844b1d00c4e033c01caf61daa0471388a11c5c"
            },
            "downloads": -1,
            "filename": "tkface-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d89e00a01365b61230db412730ca0981",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 16835,
            "upload_time": "2025-07-21T15:47:09",
            "upload_time_iso_8601": "2025-07-21T15:47:09.637251Z",
            "url": "https://files.pythonhosted.org/packages/15/35/2d21ea3fa3d540b42e323b84c21115daa0eeb262d0e0d568cfed7c374f38/tkface-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2adf577197823f55c0596a454e5802bc99948313d2d1f451ec1cd0419e7681b8",
                "md5": "e565640e49713bcc916ecbb7b597889a",
                "sha256": "60e41f8b080dfa83ed93beee5ac2beb30172718d9e78d1f0aa23085c7ae8e075"
            },
            "downloads": -1,
            "filename": "tkface-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e565640e49713bcc916ecbb7b597889a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 16876,
            "upload_time": "2025-07-21T15:47:10",
            "upload_time_iso_8601": "2025-07-21T15:47:10.968899Z",
            "url": "https://files.pythonhosted.org/packages/2a/df/577197823f55c0596a454e5802bc99948313d2d1f451ec1cd0419e7681b8/tkface-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-21 15:47:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mashu3",
    "github_project": "tkface",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tkface"
}
        
Elapsed time: 1.23550s