tktable
tktable is a Python library designed to simplify the creation of beautiful tables in Tkinter GUI applications.
Introduction
Developers using Tkinter often find creating tables natively to be challenging and time-consuming. Importing ttk.TreeView and writing numerous lines of unnecessary code is a common frustration. tktable offers a solution, allowing you to create attractive tables with just a few lines of code, enhancing the simplicity and ease of Python development.
Installation
Installing tktable is straightforward. Simply execute the following pip command:
pip install tktable
Usage
Using tktable is intuitive and requires just a few steps.
Step 1
Import the Table class from the tktable package:
from tktable import Table
Step 2
Create an instance of the Table class and provide the necessary arguments:
table_headers = ("Name", "Age", "Email")
mytable = Table(root, table_headers)
mytable.pack()
Step 3
Insert rows into the created table:
row1 = ("Jack", 12, "jack@gmail.com")
mytable.insert_row(row1)
row2 = ("John", 15, "john@gmail.com")
mytable.insert_row(row2)
Customization Options
Enhance the appearance of your table by customizing it with optional arguments in the Table class constructor.
For example, to make the headers bold:
mytable = Table(root, table_headers, headings_bold=True)
Adjust column width:
mytable = Table(root, table_headers, col_width=100)
Change the font size of the table content:
mytable = Table(root, table_headers, font_size=12)
Modify the font face of the table content:
mytable = Table(root, table_headers, font_face="Times New Roman")
Stay tuned for additional customization options in future releases!
Sample Application
import tkinter as tk
from tktable import Table
root = tk.Tk()
root.geometry("800x400")
table_headers = ("Name", "Age", "Email")
mytable = Table(root, table_headers, col_width=150, headings_bold=True)
mytable.pack(pady=100)
row = ("Nitin", 18, "ngarg@mail.com")
mytable.insert_row(row)
root.mainloop()
Contributions
Currently, the module's source code is not open-source. After publishing 2-3 more releases, we plan to open-source it. Stay tuned for updates!
Developer Info
Developed with great love by Nitin Garg.
Check out my GitHub for more exciting projects!
Thank you!
Metadata
Release files for tktable 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tktable-0.2.tar.gz | 2.9 kB | Without provenance | Details for tktable-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tktable-0.2-py3-none-any.whl | Python 3 | none | any | Details for tktable-0.2-py3-none-any.whl |
Total release size: 5.8 kB
Release files / tktable-0.2.tar.gz
| Download URL | tktable-0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76c263bcf64fa4820d6b09e6a6da145c7cebb239aa8e1e5785b7089da4e37cbf
|
|
BLAKE2b-256 checksum How to use checksums |
9a0f8e3585bf8c934ac4cfdd0c23ea49c18839672e49cb566dc7649490a9284b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Release files / tktable-0.2-py3-none-any.whl
| Download URL | tktable-0.2-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fecb4f4285b1d760a78c844e86caad781abd50fdb9ae7233279a35bda3567a53
|
|
BLAKE2b-256 checksum How to use checksums |
d3b7ba0d82069d415d4658de88caba1b45cf10a2a28f2ef49db18a864e832bab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Security for tktable 0.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.