Skip to main content

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

CTkDataTable Preview

Why Use It?

CustomTkinter Friendly

Designed to fit naturally into modern CustomTkinter applications.

Dictionary Based

Define columns and rows using simple Python dictionaries.

Practical

Built 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

Text

For names, labels, descriptions and general values.

Number

For IDs, counts, quantities and numeric data.

Badge

For 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


Download files

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

Source Distribution

ctkdatatable-0.2.0.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

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

ctkdatatable-0.2.0-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

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

Hashes for ctkdatatable-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f3ccd97fce3a4a9889ef00283bfc9180341fcb55d60b87f98437216837019007
MD5 736a0b02a7e9a9c4e956c4130959291b
BLAKE2b-256 cee8dc7701f99cd3308ecfbe815c11317009b4623506a54672171fdd2c015520

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctkdatatable-0.2.0.tar.gz:

Publisher: publish.yml on Harry-g25/CTkDataTable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ctkdatatable-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 821ee0baec442f011799c043e9cd93074b1a0f4ff46640053f82028fa0227b6f
MD5 c8a9ea0975d6c241e53778f67384ccf1
BLAKE2b-256 97589d9c47c1c85f039d5088c192f67517207e93bc50cbd9e6d9b5136bba7039

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctkdatatable-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Harry-g25/CTkDataTable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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