A virtualized data table widget for CustomTkinter applications.
Project description
What is CTkDataTable?
CTkDataTable is a Python module for building cleaner, more practical data tables inside customtkinter desktop applications.
It was created to solve a common problem: CustomTkinter is great for modern desktop interfaces, but displaying structured table data can still be awkward. Standard Tkinter options such as ttk.Treeview often feel dated, difficult to style, or out of place in a modern UI.
CTkDataTable provides a configurable table widget designed for internal tools, dashboards, admin panels, database applications and workflow software.
Preview
Why Use It?
CustomTkinter FriendlyDesigned to fit naturally into modern CustomTkinter applications. |
Dictionary BasedDefine columns and rows using simple Python dictionaries. |
PracticalBuilt for dashboards, admin tools, database viewers and internal systems. |
Features
- Built for
customtkinter - Simple column configuration
- Row data passed as dictionaries
- Configurable column titles
- Configurable column widths
- Text columns
- Number columns
- Badge columns
- Cleaner alternative to
ttk.Treeview - Useful for desktop dashboards and database-driven apps
Installation
pip install CTkDataTable
Quick Start
import customtkinter as ctk
from CTkDataTable import CTkDataTable
app = ctk.CTk()
app.title("CTkDataTable Example")
app.geometry("900x500")
columns = [
{
"key": "id",
"title": "ID",
"width": 50,
"type": "number"
},
{
"key": "first_name",
"title": "First Name",
"width": 140,
"type": "text"
},
{
"key": "last_name",
"title": "Last Name",
"width": 140,
"type": "text"
},
{
"key": "position",
"title": "Position",
"width": 180,
"type": "text"
},
{
"key": "permission",
"title": "Permission",
"width": 140,
"type": "badge",
"badge_colors": {
"Admin": "red",
"Manager": "blue",
"Standard": "gray"
}
}
]
rows = [
{
"id": 1,
"first_name": "Harry",
"last_name": "Gomm",
"position": "Manager",
"permission": "Manager"
},
{
"id": 2,
"first_name": "Ben",
"last_name": "Jones",
"position": "Engineer",
"permission": "Standard"
},
{
"id": 3,
"first_name": "Charlie",
"last_name": "Smith",
"position": "Admin",
"permission": "Admin"
}
]
table = CTkDataTable(
master=app,
columns=columns,
rows=rows
)
table.pack(fill="both", expand=True, padx=20, pady=20)
app.mainloop()
How It Works
flowchart LR
A[Define Columns] --> B[Create Row Data]
B --> C[Pass Data to CTkDataTable]
C --> D[Render Table]
D --> E[Display Structured Data]
Column Configuration
Columns are defined using dictionaries.
columns = [
{
"key": "first_name",
"title": "First Name",
"width": 140,
"type": "text"
}
]
| Property | Description |
|---|---|
key |
The key used to match data from each row |
title |
The text displayed in the table header |
width |
The width of the column |
type |
The column display type |
Supported Column Types
TextFor names, labels, descriptions and general values. |
NumberFor IDs, counts, quantities and numeric data. |
BadgeFor statuses, permissions, categories and priority labels. |
Text Column
{
"key": "name",
"title": "Name",
"width": 160,
"type": "text"
}
Number Column
{
"key": "id",
"title": "ID",
"width": 60,
"type": "number"
}
Badge Column
{
"key": "permission",
"title": "Permission",
"width": 140,
"type": "badge",
"badge_colors": {
"Admin": "red",
"Manager": "blue",
"Standard": "gray"
}
}
Row Data
Rows are passed as a list of dictionaries.
rows = [
{
"id": 1,
"first_name": "Harry",
"last_name": "Gomm",
"position": "Manager",
"permission": "Manager"
}
]
Each row key should match the key value defined in the column configuration.
Use Cases
CTkDataTable can be used for:
- Admin panels
- User management screens
- Database viewers
- Desktop dashboards
- CRUD applications
- Job management tools
- Stock or asset registers
- Reporting interfaces
Project Status
CTkDataTable is currently in development.
It is being improved through practical use in real CustomTkinter desktop application projects. Feedback, issues and suggestions are welcome.
Contributing
Contributions are welcome.
If you find a bug, have an idea for a feature, or want to improve the documentation, feel free to open an issue or submit a pull request.
Licence
This project is released under the MIT Licence.
Links
Built for clean, practical CustomTkinter applications.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctkdatatable-0.2.0.tar.gz.
File metadata
- Download URL: ctkdatatable-0.2.0.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3ccd97fce3a4a9889ef00283bfc9180341fcb55d60b87f98437216837019007
|
|
| MD5 |
736a0b02a7e9a9c4e956c4130959291b
|
|
| BLAKE2b-256 |
cee8dc7701f99cd3308ecfbe815c11317009b4623506a54672171fdd2c015520
|
Provenance
The following attestation bundles were made for ctkdatatable-0.2.0.tar.gz:
Publisher:
publish.yml on Harry-g25/CTkDataTable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctkdatatable-0.2.0.tar.gz -
Subject digest:
f3ccd97fce3a4a9889ef00283bfc9180341fcb55d60b87f98437216837019007 - Sigstore transparency entry: 1753355705
- Sigstore integration time:
-
Permalink:
Harry-g25/CTkDataTable@ef03da2fb88e11847363bd200727b35c95df8048 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Harry-g25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ef03da2fb88e11847363bd200727b35c95df8048 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ctkdatatable-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ctkdatatable-0.2.0-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
821ee0baec442f011799c043e9cd93074b1a0f4ff46640053f82028fa0227b6f
|
|
| MD5 |
c8a9ea0975d6c241e53778f67384ccf1
|
|
| BLAKE2b-256 |
97589d9c47c1c85f039d5088c192f67517207e93bc50cbd9e6d9b5136bba7039
|
Provenance
The following attestation bundles were made for ctkdatatable-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Harry-g25/CTkDataTable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctkdatatable-0.2.0-py3-none-any.whl -
Subject digest:
821ee0baec442f011799c043e9cd93074b1a0f4ff46640053f82028fa0227b6f - Sigstore transparency entry: 1753355758
- Sigstore integration time:
-
Permalink:
Harry-g25/CTkDataTable@ef03da2fb88e11847363bd200727b35c95df8048 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Harry-g25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ef03da2fb88e11847363bd200727b35c95df8048 -
Trigger Event:
release
-
Statement type: