Skip to main content

Simple and beginner-friendly table widget for Tkinter

Project description

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


✨ Why Tkable?

  • No complex setup
  • No Treeview headaches
  • Built for beginners
  • Clean API
  • Works out of the box

🧠 When should you use Tkable?

✔ Learning Tkinter

✔ Building simple apps

✔ Creating dashboards

✔ Managing data visually


📦 Installation

pip install tkable

🚀 Quick Example

from tkable import DataTable
import tkinter as tk

root = tk.Tk()

table = DataTable(root, ["Name", "Age", "City"], header_bg="#ff004c" , alternating_colors=("#ffffff", "#ffcadc"))

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

root.mainloop()

📸 Screenshot

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, "City 1"],
    ["Person 2", 22, "City 2"]
])

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.



🤝 Contributing

Pull requests are welcome!


⭐ Support

If you like this project, give it a star ⭐

It helps a lot!


📄 License

MIT License © Abdullah Sameh

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.3.tar.gz (4.6 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.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tkable-1.0.3.tar.gz
  • Upload date:
  • Size: 4.6 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.3.tar.gz
Algorithm Hash digest
SHA256 16ba7c7ced7ac8511502aee6cca8644ff0cc702f1bcc98971e71e0366392e5d6
MD5 6bb4ed434c3e9b450cf9ed6c48c37543
BLAKE2b-256 26dd0ff2b325a288903782f7c08bb559317a260f6800abfb2808f9342ec0feb2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tkable-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eb5dc01f82d1f79c08e80ed561ccf9c28d5d21ca622ff3bf6ef93338dea07346
MD5 73bdfd9a3f49befc2d1cfc8986e5ed77
BLAKE2b-256 9a7484b010a309532a49421e46aae54e88b05165b0024cd4729903c3b2222082

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