tkextras


Nametkextras JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/whellcome/tkextras
SummaryA Tkinter utility module for enhanced widgets rendering
upload_time2025-01-27 01:24:06
maintainerNone
docs_urlNone
authorDietmar Steinle
requires_python>=3.9
licenseMIT
keywords tkinter ttk gui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tkextras

**Enhancing tkinter development with streamlined rendering and DataFrame-powered Treeview.**

tkextras is a lightweight Python library that extends tkinter functionality, making GUI development easier and more
efficient. It introduces a simplified widget rendering system and an extended Treeview component that integrates
seamlessly with pandas DataFrames.

## Features

- **WidgetsRender**: Unified interface for rendering widgets with `grid()`, `pack()`, and `place()` methods.
- **TreeviewDataFrame**: Extended `ttk.Treeview` that synchronizes with `pandas.DataFrame`.
- **Built-in Filtering**: Interactive filtering and flagging for table-based data.
- **Event System Integration**: Custom events for enhanced user interaction.
- **Sphinx Documentation**: Full [API documentation](https://tkextras.readthedocs.io) and usage examples.

## Installation

1. Install the module:

    ```sh
    pip install tkextras
    ```

2. Clone the repository:
   ```bash
   git clone https://github.com/whellcome/tkextras.git
   cd tkextras
   ```

## Usage

### Rendering Widgets Easily

```python
import tkinter as tk
from tkextras import WidgetsRender


class ExampleApp(WidgetsRender, tk.Tk, ):
  def __init__(self):
    super().__init__()
    lable = self.rgrid(tk.Label(self), dict(row=0, column=0))
    lable['text'] = "Hello, World!"

app = ExampleApp()
app.mainloop()
```
Advanced **[working example](examples/example_widgets_render.py)** of WidgetsRender application


### Working with Treeview and DataFrames

```python
from tkextras import TreeviewDataFrame
import tkinter as tk

root = tk.Tk()
tree = TreeviewDataFrame(root, columns=["Name", "Married", "Employed"], show='headings')
tree.pack(fill="both", expand=True)

tree.insert("", "end", values=("Alice", " ", " "))  # Normal rows addition
tree.insert("", "end", values=("Bob", " ", " "))

tree.make_tree()  # Tree design, can include a Dataframe(transformed, with identical columns) to loading
tree.bind("<<TreeToggleCell>>", lambda x: print(tree.df))  # DataFrame synchronization

root.mainloop()
```
Advanced **[working example](examples/example_treeview_dataframe.py)** of TreeviewDataFrame application:

![Example TreeviewDataFrame](https://raw.githubusercontent.com/whellcome/tkextras/4318f6286a884fd38f3a8827b05bf871910e6a30/example_treeview_dataframe.png)

## Documentation

Complete documentation is available at:

рџ“– **[Project Documentation](https://tkextras.readthedocs.io)**

## Examples

For real-world applications, see the **examples/** folder, or check out:

- **MS Access to SQL Export Tool** ([GitHub](https://github.com/whellcome/MSAccessToSQL)) - Uses tkextras for UI
  components.

## Contributing

Contributions are welcome! Open an issue or submit a pull request if you have improvements or bug fixes.

> **Need support or have a suggestion?** 🚀🔥  
> Please open an [issue](https://github.com/whellcome/tkextras/issues) on GitHub.

## License

This project is licensed under the MIT License.

---

рџљЂ **Enhance your tkinter experience with tkextras!**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/whellcome/tkextras",
    "name": "tkextras",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "tkinter, ttk, gui",
    "author": "Dietmar Steinle",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/7e/17/dbba93975b56606f52708882f015ab7fd6402a984e91335962d8c17fa30e/tkextras-1.1.0.tar.gz",
    "platform": null,
    "description": "# tkextras\r\n\r\n**Enhancing tkinter development with streamlined rendering and DataFrame-powered Treeview.**\r\n\r\ntkextras is a lightweight Python library that extends tkinter functionality, making GUI development easier and more\r\nefficient. It introduces a simplified widget rendering system and an extended Treeview component that integrates\r\nseamlessly with pandas DataFrames.\r\n\r\n## Features\r\n\r\n- **WidgetsRender**: Unified interface for rendering widgets with `grid()`, `pack()`, and `place()` methods.\r\n- **TreeviewDataFrame**: Extended `ttk.Treeview` that synchronizes with `pandas.DataFrame`.\r\n- **Built-in Filtering**: Interactive filtering and flagging for table-based data.\r\n- **Event System Integration**: Custom events for enhanced user interaction.\r\n- **Sphinx Documentation**: Full [API documentation](https://tkextras.readthedocs.io) and usage examples.\r\n\r\n## Installation\r\n\r\n1. Install the module:\r\n\r\n    ```sh\r\n    pip install tkextras\r\n    ```\r\n\r\n2. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/whellcome/tkextras.git\r\n   cd tkextras\r\n   ```\r\n\r\n## Usage\r\n\r\n### Rendering Widgets Easily\r\n\r\n```python\r\nimport tkinter as tk\r\nfrom tkextras import WidgetsRender\r\n\r\n\r\nclass ExampleApp(WidgetsRender, tk.Tk, ):\r\n  def __init__(self):\r\n    super().__init__()\r\n    lable = self.rgrid(tk.Label(self), dict(row=0, column=0))\r\n    lable['text'] = \"Hello, World!\"\r\n\r\napp = ExampleApp()\r\napp.mainloop()\r\n```\r\nAdvanced **[working example](examples/example_widgets_render.py)** of WidgetsRender application\r\n\r\n\r\n### Working with Treeview and DataFrames\r\n\r\n```python\r\nfrom tkextras import TreeviewDataFrame\r\nimport tkinter as tk\r\n\r\nroot = tk.Tk()\r\ntree = TreeviewDataFrame(root, columns=[\"Name\", \"Married\", \"Employed\"], show='headings')\r\ntree.pack(fill=\"both\", expand=True)\r\n\r\ntree.insert(\"\", \"end\", values=(\"Alice\", \" \", \" \"))  # Normal rows addition\r\ntree.insert(\"\", \"end\", values=(\"Bob\", \" \", \" \"))\r\n\r\ntree.make_tree()  # Tree design, can include a Dataframe(transformed, with identical columns) to loading\r\ntree.bind(\"<<TreeToggleCell>>\", lambda x: print(tree.df))  # DataFrame synchronization\r\n\r\nroot.mainloop()\r\n```\r\nAdvanced **[working example](examples/example_treeview_dataframe.py)** of TreeviewDataFrame application:\r\n\r\n![Example TreeviewDataFrame](https://raw.githubusercontent.com/whellcome/tkextras/4318f6286a884fd38f3a8827b05bf871910e6a30/example_treeview_dataframe.png)\r\n\r\n## Documentation\r\n\r\nComplete documentation is available at:\r\n\r\n\u0440\u045f\u201c\u2013 **[Project Documentation](https://tkextras.readthedocs.io)**\r\n\r\n## Examples\r\n\r\nFor real-world applications, see the **examples/** folder, or check out:\r\n\r\n- **MS Access to SQL Export Tool** ([GitHub](https://github.com/whellcome/MSAccessToSQL)) - Uses tkextras for UI\r\n  components.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Open an issue or submit a pull request if you have improvements or bug fixes.\r\n\r\n> **Need support or have a suggestion?** \u0440\u045f\u0459\u0402\u0440\u045f\u201d\u0490  \r\n> Please open an [issue](https://github.com/whellcome/tkextras/issues) on GitHub.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License.\r\n\r\n---\r\n\r\n\u0440\u045f\u0459\u0402 **Enhance your tkinter experience with tkextras!**\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Tkinter utility module for enhanced widgets rendering",
    "version": "1.1.0",
    "project_urls": {
        "Documentation": "https://tkextras.readthedocs.io/",
        "Download": "https://github.com/whellcome/tkextras/archive/master.zip",
        "Examples": "https://github.com/whellcome/tkextras/tree/master/examples",
        "Homepage": "https://github.com/whellcome/tkextras",
        "Source Code": "https://github.com/whellcome/tkextras/tree/master/tkextras"
    },
    "split_keywords": [
        "tkinter",
        " ttk",
        " gui"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eaefe2fbc46a2b0a6adc59f9bd010dada47392779849d59d48da7e0b208a69a4",
                "md5": "42859bff61c29998737b7e8fec8d9deb",
                "sha256": "37014db41a58997acf0b517d34fcad11d34b90267b093ddabb1cbf499b7d2fcb"
            },
            "downloads": -1,
            "filename": "tkextras-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "42859bff61c29998737b7e8fec8d9deb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8975,
            "upload_time": "2025-01-27T01:24:05",
            "upload_time_iso_8601": "2025-01-27T01:24:05.019180Z",
            "url": "https://files.pythonhosted.org/packages/ea/ef/e2fbc46a2b0a6adc59f9bd010dada47392779849d59d48da7e0b208a69a4/tkextras-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7e17dbba93975b56606f52708882f015ab7fd6402a984e91335962d8c17fa30e",
                "md5": "fe94b1671d76ee8902f3e45f004e9687",
                "sha256": "3a794f038d0f664d25f7a4956b1d1dbc2833d1831adc5c844e5423ed17d5d3ea"
            },
            "downloads": -1,
            "filename": "tkextras-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fe94b1671d76ee8902f3e45f004e9687",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11065,
            "upload_time": "2025-01-27T01:24:06",
            "upload_time_iso_8601": "2025-01-27T01:24:06.929379Z",
            "url": "https://files.pythonhosted.org/packages/7e/17/dbba93975b56606f52708882f015ab7fd6402a984e91335962d8c17fa30e/tkextras-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-27 01:24:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "whellcome",
    "github_project": "tkextras",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tkextras"
}
        
Elapsed time: 0.84286s