Skip to main content

Simple and beginner-friendly table widget for Tkinter

Project description

The simplest way to create tables in Tkinter for beginners :)


✨ Features

  • Easy to use
  • Insert rows or dictionaries
  • Column sorting
  • Alternating row colors
  • Scrollable table

📦 Installation

pip install tkable

🚀 Quick Example

from tkable import DataTable
import tkinter as tk

root = tk.Tk()

table = DataTable(root, ["Name", "Age", "City"])

table.load_data([
    ["Person 1", 20, "City 1"],
    ["Person 2", 22, "City 2"]
])

root.mainloop()

📸 Result

Result Screenshot


🔧 Customization Options

Parameter Type Default Description
header_bg str #2c3e50 Header background color
header_fg str white Header text color
row_height int 28 Height of each row
font tuple ("Segoe UI", 10) Font used in the table
alternating_colors tuple ("#ffffff", "#f5f5f5") Row background colors

📦 API Reference

insert_row(*values)

Add a new row to the table.

table.insert_row("Person Name", 20, "City")

insert_dict(data: dict)

Insert a row using a dictionary.

table.insert_dict({
    "Name": "Person Name",
    "Age": 22,
    "City": "City"
})

load_data(data)

Load multiple rows.

table.load_data([
    ["Person 1", 20],
    ["Person 2", 22]
])

clear()

Remove all rows.

table.clear()

get_selected_row()

Return selected row as dictionary.

selected = table.get_selected_row()

💡 Tip: Use insert_dict() when working with forms for cleaner code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tkable-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tkable-1.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file tkable-1.0.1.tar.gz.

File metadata

  • Download URL: tkable-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tkable-1.0.1.tar.gz
Algorithm Hash digest
SHA256 558f39a97ab78487650c93b0abd5c8f2720484cacc0be90c19d4b35cf6141645
MD5 59a9e5ab99fa16b7ef3111a9388f865e
BLAKE2b-256 7474e0123517a8bc5d7e754d058a99b7edc81d8b435f6ad6f6801b19231b069a

See more details on using hashes here.

File details

Details for the file tkable-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tkable-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tkable-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b8382f4c321b89e4874e4636a000353ec1d20e7d1d4d26a2565d1e33a07fc26
MD5 090608a95a531e15bda6395722d3c135
BLAKE2b-256 10daa8e487e907d40547d67a1eca59937121d51516b6c1e075379d2ec5cd21f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page