https://github.com/natorsc/py-gtk
Repository created to centralize tips, tutorials and code examples on building graphical interfaces with the Python programming language (PyGObject) and the GTK graphics tookit.
https://github.com/natorsc/py-gtk
furo gnome gtk gtk3 gtk4 pygobject python python-3 python3 sphinx sphinx-doc
Last synced: 25 days ago
JSON representation
Repository created to centralize tips, tutorials and code examples on building graphical interfaces with the Python programming language (PyGObject) and the GTK graphics tookit.
- Host: GitHub
- URL: https://github.com/natorsc/py-gtk
- Owner: natorsc
- License: mit
- Created: 2020-04-25T18:23:07.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T21:03:43.000Z (about 2 months ago)
- Last Synced: 2025-03-30T07:09:05.080Z (about 1 month ago)
- Topics: furo, gnome, gtk, gtk3, gtk4, pygobject, python, python-3, python3, sphinx, sphinx-doc
- Language: Python
- Homepage: https://justcode.com.br/
- Size: 3.78 MB
- Stars: 112
- Watchers: 9
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
 and GTK")
[](https://github.com/natorsc/py-gtk "Go to repository.")
โ
[](https://github.com/natorsc/py-gtk)
โ
[](https://github.com/natorsc/py-gtk)[](./LICENSE)
# Creating graphical interfaces with Python (PyGObject) and GTK
## ๐ Description
This repository is your go-to hub for tips, tutorials, and code examples on building stunning graphical interfaces with Python (PyGObject) and the GTK toolkit. Whether you're a beginner or an experienced developer, you'll find valuable resources to enhance your projects. If this content helps you, consider supporting the project with a donation to keep it growing!
---
## ๐ Technologies used
To date, the following technologies have been used to build the project:
[](https://www.python.org/ "Go to the site.")
โ
[](https://www.gtk.org/ "Go to the site.")
โ
[](https://github.com/astral-sh/uv)---
## ๐ค Author
Crafted with ๐ by Renato Cruz ๐ค๐ค Got questions or feedback? Feel free to reach out!
[](mailto:[email protected] "Send an email.")
What Iโm listening to while deep in study or code mode ๐๐ต:
[](https://open.spotify.com/playlist/1xf3u29puXlnrWO7MsaHL5?si=A-LgwRJXSvOno_e6trpi5w&utm_source=copy-link "Access the playlist.")
---
## ๐ Donations
Thank you for your donation! Your support helps me keep this content alive and growing ๐.
### Github
https://github.com/sponsors/natorsc/
### Pix (Brazil)
**Chave**: `b1839493-2afe-484d-9272-82a3e402b36f`
---
## ๐ก Extra
### GTK
- [Documentation GTK 3](https://docs.gtk.org/gtk3/).
- [Documentation GTK 4](https://docs.gtk.org/gtk4/).### Libadwaita
- [Documentation 1.x](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/).
### GNOME
- [Official website](https://www.gnome.org/).
- [Blog](https://blogs.gnome.org/).
- [GNOME Human Interface Guidelines (HIG)](https://wiki.gnome.org/Design/HIG).### Development
- [GNOME Builder](https://apps.gnome.org/pt-BR/app/org.gnome.Builder/).
- [Workbench](https://apps.gnome.org/pt-BR/app/re.sonny.Workbench/).
- [Cambalache](https://flathub.org/pt-BR/apps/ar.xjuan.Cambalache).
- [Icon Library](https://flathub.org/apps/details/org.gnome.design.IconLibrary).
- [Typography](https://flathub.org/apps/details/org.gnome.design.Typography).
- [App Icon Preview](https://flathub.org/apps/details/org.gnome.design.AppIconPreview).
- [Symbolic Preview](https://flathub.org/apps/details/org.gnome.design.SymbolicPreview).
- [Color Palette](https://flathub.org/apps/details/org.gnome.design.Palette).
- [Gnome icon library online](https://teams.pages.gitlab.gnome.org/Design/icon-development-kit-www/).### Softwares
- [GNOME Apps](https://apps.gnome.org/pt-BR/).
- [GNOME circle](https://circle.gnome.org/).
- [Awesome GTK](https://github.com/valpackett/awesome-gtk).### Flatpak
- [Official website](https://www.flatpak.org/).
- [Flathub](https://flathub.org/).### Visual Studio Code
- [Gnome Magic (bedsteler20)](https://marketplace.visualstudio.com/items?itemName=bedsteler20.gnome-magic).
- [GTK Blueprint (Bodil Stokke)](https://marketplace.visualstudio.com/items?itemName=bodil.blueprint-gtk).
- [Flatpak (Bilal Elmoussaoui)](https://marketplace.visualstudio.com/items?itemName=bilelmoussaoui.flatpak-vscode).---
## Widgets
### GTK
#### Gtk.ActionBar

- [Python](./src/gtk-widgets/actionbar/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/actionbar/ui/MainWindow.blp).---
#### Gtk.Application

- [Python](./src/gtk-widgets/application/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/application/ui).---
#### Gtk.ApplicationWindow

- [Python](./src/gtk-widgets/application-window/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/application-window/ui).---
#### Gtk.Box (horizontal)
")
- [Python](./src/gtk-widgets/box-horizontal/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/box-horizontal/ui).---
#### Gtk.Box (vertical)
")
- [Python](./src/gtk-widgets/box-vertical/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/box-vertical/ui).---
#### Gtk.Button

- [Python](./src/gtk-widgets/button/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/button/ui).---
#### Gtk.Calendar

- [Python](./src/gtk-widgets/calendar/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/calendar/ui).---
#### Gtk.CheckButton

- [Python](./src/gtk-widgets/check-button/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/check-button/ui).---
#### Gtk.CheckButton (radio)
")
- [Python](./src/gtk-widgets/check-button-radio/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/check-button-radio/ui).---
#### Gtk.ColorDialogButton

- [Python](./src/gtk-widgets/color-dialog-button/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/color-dialog-button/ui).---
#### Drag and drop

- [Python](./src/gtk-widgets/drag-and-drop/MainWindow.py).
---
#### Gtk.DropDown

- [Python](./src/gtk-widgets/drop-down/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/drop-down/ui).---
#### Gtk.Entry

- [Python](./src/gtk-widgets/entry/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/entry/ui).---
#### Gtk.FileDialog (folder)
")
- [Python](./src/gtk-widgets/file-dialog-folder/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/file-dialog-folder/ui).---
#### Gtk.FileDialog (open)
")
- [Python](/src/gtk-widgets/file-dialog-open/MainWindow.py).
- [GTK Blueprint](/src/gtk-widgets/file-dialog-open/ui).---
#### Gtk.FileDialog (save)
")
- [Python](./src/gtk-widgets/file-dialog-save/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/file-dialog-save/ui).---
#### Gtk.Fixed

- [Python](./src/gtk-widgets/fixed/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/fixed/ui).---
#### Gtk.FlowBox

- [Python](./src/gtk-widgets/flow-box/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/flow-box/ui).---
#### Gtk.Grid

- [Python](./src/gtk-widgets/grid/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/grid/ui).---
#### Gtk.HeaderBar

- [Python](./src/gtk-widgets/header-bar/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/header-bar/ui).---
#### Gtk.Image

- [Python](./src/gtk-widgets/image/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/image/ui).---
#### Gtk.ListBox

- [Python](./src/gtk-widgets/list-box/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/list-box/ui).---
#### Gtk.ListView

> ๐จ Criar cรณdigo Python.
- [Python](#gtklistview).
- [GTK Blueprint](./src/gtk-widgets/list-view/ui).---
#### Gtk.MenuButton

- [Python](./src/gtk-widgets/menu-button/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/menu-button/ui).---
#### Gtk.Overlay

- [Python](./src/gtk-widgets/overlay/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/overlay/ui).---
Pango tags
==========
- [Python](./src/gtk-widgets/pango-tags/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/pango-tags/ui).---
#### Gtk.Picture

- [Python](./src/gtk-widgets/picture/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/picture/ui).---
#### Gtk.PrintOperation

- [Python](./src/gtk-widgets/print-operation/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/print-operation/ui).---
#### Gtk.SearchBar

- [Python](./src/gtk-widgets/search-bar/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/search-bar/ui).---
#### Gtk.ShortcutsWindow

> ๐จ Criar cรณdigo Python.
- [GTK Blueprint](./src/gtk-widgets/shortcuts-window/ui).
---
#### Signals and slots

- [Python](./src/gtk-widgets/signals-and-slots/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/signals-and-slots/ui).---
#### Gtk.StackSidebar

- [Python](./src/gtk-widgets/stack-sidebar/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/stack-sidebar/ui).---
#### Gtk.StackSwitcher

- [Python](./src/gtk-widgets/stack-switcher/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/stack-switcher/ui).---
#### Gtk.Switch

- [Python](./src/gtk-widgets/switch/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/switch/ui).---
#### Translation (gettext)
")
> ๐จ Revisar.
- [Python](./src/gtk-widgets/translator-gettext/MainWindow.py).
---
#### Gtk.Video

- [Python](./src/gtk-widgets/video/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/video/ui).---
#### Gtk.Window

- [Python](./src/gtk-widgets/window/MainWindow.py).
- [GTK Blueprint](./src/gtk-widgets/window/ui).---
### Libadwaita
#### Adw.AboutDialog

- [Python](./src/libadwaita-widgets/about-dialog/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/about-dialog/ui).---
#### Adw.ActionRow

- [Python](./src/libadwaita-widgets/action-row/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/action-row/ui).---
#### Adw.Application

- [Python](./src/libadwaita-widgets/application/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/application/ui).---
#### Adw.Avatar

- [Python](./src/libadwaita-widgets/avatar/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/avatar/ui).---
#### Adw.Banner

- [Python](./src/libadwaita-widgets/banner/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/banner/ui).---
#### Adw.ButtonContent

- [Python](./src/libadwaita-widgets/button-content/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/button-content/ui).---
#### Adw.Carousel

- [Python](./src/libadwaita-widgets/carousel/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/carousel/ui).---
#### Adw.CarouselIndicatorDots

- [Python](./src/libadwaita-widgets/carousel-indicator-dots/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/carousel-indicator-dots/ui).---
#### Adw.CarouselIndicatorLines

- [Python](./src/libadwaita-widgets/carousel-indicator-lines/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/carousel-indicator-lines/ui).---
#### Adw.Clamp

- [Python](./src/libadwaita-widgets/clamp/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/clamp/ui).---
#### Adw.ComboRow

- [Python](./src/libadwaita-widgets/combo-row/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/combo-row/ui).---
#### Adw.EntryRow

- [Python](./src/libadwaita-widgets/entry-row/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/entry-row/ui).---
#### Adw.ExpanderRow

- [Python](./src/libadwaita-widgets/expander-row/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/expander-row/ui).---
#### Adw.MessageDialog

- [Python](./src/libadwaita-widgets/message-dialog/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/message-dialog/ui).---
#### Adw.NavigationSplitView

- [Python](./src/libadwaita-widgets/navigation-split-view/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/navigation-split-view/ui).---
#### Adw.NavigationView

- [Python](./src/libadwaita-widgets/navigation-view/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/navigation-view/ui).---
#### Adw.PasswordEntryRow

- [Python](./src/libadwaita-widgets/password-entry-row/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/password-entry-row/ui).---
#### Adw.PreferencesPage

- [Python](./src/libadwaita-widgets/preferences-page/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/preferences-page/ui).---
#### Adw.PreferencesWindow

- [Python](./src/libadwaita-widgets/preferences-window/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/preferences-window/ui).---
#### Adw.SplitButton

- [Python](./src/libadwaita-widgets/split-button/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/split-button/ui).---
#### Adw.StatusPage

- [Python](./src/libadwaita-widgets/status-page/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/status-page/ui).--
#### Adw.Toast

- [Python](./src/libadwaita-widgets/toast/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/toast/ui).---
#### Adw.ToolbarView
> Todo: GTK Blueprint.

- [Python](./src/libadwaita-widgets/toolbar-view/MainWindow.py).
---
#### Adw.ViewStack

- [Python](./src/libadwaita-widgets/view-stack/MainWindow.py).
- [GTK Blueprint](./src/libadwaita-widgets/view-stack/ui).