Skip to main content

TkWebUI

Modern Web-style themes and widgets for Python's tkinter / ttk. 给 Python 自带的 Tkinter / ttk 换上现代 Web 应用风格的外观,并补齐常用控件。

Installation / 安装

python -m pip install tkwebui

Requires Python 3.8+ with Tkinter available. Developed and tested on Windows 11 with Python 3.11. Other platforms use pure-Python fallbacks and have not been fully tested. On Linux, install your distribution's Tkinter package (often python3-tk) if needed; Tkinter is not installed by pip.

Core widgets use only the Python standard library. No external theme images or browser engine are required. ImageViewer can optionally use Pillow for JPEG, WebP and additional image formats.

Quick start / 快速开始

import tkinter as tk
from tkinter import ttk
import tkwebui as ui

ui.enable_dpi_awareness()
root = tk.Tk()
root.title("TkWebUI example")
ui.apply_theme(root)
ttk.Entry(root).pack(padx=24, pady=12)
ttk.Button(root, text="Save", style="Primary.TButton").pack(padx=24, pady=12)
root.mainloop()

Call enable_dpi_awareness() before creating the Tk root, and apply_theme(root) before creating widgets.

The library provides menus, dropdowns, tooltips, dialogs, cards, navigation, tables, an editable spreadsheet, charts, date pickers and form controls. Version 0.3.2 fixes dropdown and tooltip positioning on secondary monitors, including negative virtual-desktop coordinates.

Demo and documentation

Download the GitHub source or source distribution, then run python demo.py to open the 12-page widget gallery. The wheel installs the library; the demo stays in the source distribution.

Do not mix TkWebUI and TkWin11 in the same Tk interpreter. MIT license.

Metadata

Release files for tkwebui 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkwebui 0.3.2
File Size Uploaded Provenance Actions
tkwebui-0.3.2.tar.gz 1.1 MB Without provenance Details for tkwebui-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tkwebui 0.3.2
File Interpreter ABI Platform Actions
tkwebui-0.3.2-py3-none-any.whl Python 3 none any Details for tkwebui-0.3.2-py3-none-any.whl

Total release size: 1.2 MB

Release files / tkwebui-0.3.2.tar.gz

Download URL tkwebui-0.3.2.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c51317a63c9c1a230bdae9a0ee11bd328ce24db735081f055d8a88553248efac
BLAKE2b-256 checksum
How to use checksums
8baed1505b179a2fa08ba709f56a3a79100672e6a471e13e562c21ab81cf3dd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / tkwebui-0.3.2-py3-none-any.whl

Download URL tkwebui-0.3.2-py3-none-any.whl
Size 89.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18cf68fd2520159612a32f95c41e7608f797328a4e3dccf9d71ccfafd0a68de5
BLAKE2b-256 checksum
How to use checksums
9daeb270b301f96374183372f62cf2fb1489aec7f58f4c8c97aeba15b33dbedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Security for tkwebui 0.3.2

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.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page