https://github.com/code-wizaard/gtkinter
https://github.com/code-wizaard/gtkinter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/code-wizaard/gtkinter
- Owner: Code-Wizaard
- License: gpl-3.0
- Created: 2025-07-30T17:55:53.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-30T18:32:32.000Z (11 months ago)
- Last Synced: 2025-07-30T19:59:54.920Z (11 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GTkinter π§©
> Simple. Clean. Pythonic GTK for humans.
[](https://pypi.org/project/GTkinter/)
[](LICENSE)
[](https://www.python.org/downloads/)
[](https://www.gtk.org/)
[](https://github.com/Code-Wizaard/GTkinter)
---
## π What is GTkinter?
**GTkinter** is a Python library that wraps GTK in a beautiful, clean, and beginner-friendly interface β similar in spirit to Tkinter but powered by modern GTK.
Itβs great for:
- π§βπ» Beginners who hate GTKβs verbosity
- π Rapid prototyping
- π§Ό Keeping your GUI code clean and tidy
- π§ Learning GUI programming without headaches
---
## π Features
β
Very simple API
β
Modern GTK3 under the hood
β
Automatic layout system (VBox / HBox)
β
Signal binding with Enums (type-safe!)
β
Easily extendable with your own widgets
β
PyPI installable (`pip install GTkinter`)
β
No XML, no Glade, no nonsense
---
## π¦ Installation
Make sure you have GTK3 and PyGObject installed on your **Linux system**:
### On Arch-based distros:
```bash
sudo pacman -S gtk3 gobject-introspection
```
### On Debian/Ubuntu:
```bash
sudo apt install python3-gi gir1.2-gtk-3.0
```
### Then:
```bash
pip install GTkinter
```
---
## π§ͺ Example
```python
from GTkinter import App, Window, Button, Label, VBox
from GTkinter.enums import Events
app = App()
win = Window("Hello GTkinter", 300, 200)
layout = VBox()
label = Label("Click the button")
btn = Button("Click me")
def on_click(button):
label.set_text("You clicked me!")
btn.connect(Events.CLICKED, on_click)
layout.add(label)
layout.add(btn)
win.set_child(layout)
win.connect(Events.DESTROY, lambda w: exit(0))
app.run(win)
```
---
## π§ API Overview
| Component | Description |
|----------|----------------------------------|
| `App` | Your main GTK application |
| `Window` | A top-level window |
| `Button` | A clickable button |
| `Label` | A text label |
| `VBox` | Vertical layout container |
| `HBox` | Horizontal layout container |
| `Events` | Enum for signal types (clicked, etc.) |
---
## π‘ Why GTkinter?
GTK is great. But itβs also:
- Verbose
- Hard to teach
- Ugly without Glade
GTkinter changes that by:
- Wrapping complex APIs in minimal classes
- Making it feel like Tkinter (but better looking)
- Emphasizing readability and flow
---
## π§βπ» Contributing
Pull requests are welcome!
If you have a suggestion or want to extend the widget set, open an issue or PR.
---
## π License
GPL-3 License β see [LICENSE](LICENSE) file.
---
## π Related Projects
- [PyGObject](https://pygobject.readthedocs.io/) β Python bindings for GObject and GTK
- [GTK](https://www.gtk.org/) β The GTK GUI toolkit
---
## β€οΈ Credits
Built with love by **@Code-Wizaard**
Contributions & stars are appreciated π