Generated by GPT-5-mini| PyGObject | |
|---|---|
![]() | |
| Name | PyGObject |
| Developer | GNOME Project |
| Released | 2008 |
| Programming language | C, Python |
| Operating system | Linux, BSD, macOS, Windows |
| Genre | Language bindings |
| License | GNU Lesser General Public License |
PyGObject PyGObject is a set of Python bindings for GObject-based libraries providing access to GNOME platform APIs and GTK. It enables Python applications to use libraries from the GNOME ecosystem while interoperating with libraries used by Red Hat, Canonical (company), SUSE, Debian, and other distributors. Developers from projects such as GNOME, GTK+, GStreamer, NetworkManager, and BlueZ (software) leverage PyGObject to build graphical, multimedia, networking, and system software.
PyGObject exposes GObject Introspection-annotated C libraries to the Python (programming language) runtime, connecting with runtime systems like glib, GObject, GIO, libffi, and the Python C API. It integrates with cross-platform GUI toolkits such as GTK+ 3, GTK+ 4, and multimedia stacks like GStreamer, enabling applications similar in scope to those developed by Mozilla Foundation, Spotify, Valve Corporation, and Blender Foundation. The bindings facilitate event-driven programming with main loops such as GLib main loop used in projects like NetworkManager and PulseAudio clients.
Development traces to efforts in the mid-2000s when GNOME developers sought a modern binding mechanism to replace manually written wrappers such as those used by early PyGTK and third-party wrappers for GObject. Core contributors included engineers from Red Hat, Canonical (company), and individual maintainers active in GNOME Project and Freedesktop.org. The transition to GObject Introspection followed precedents set by introspection initiatives in GObject and was influenced by the adoption of GStreamer introspection. Key milestones parallel releases of GTK+ 3, the deprecation of PyGTK, and enhancements to libffi and the Python C API across Python (programming language) versions.
PyGObject sits between the Python interpreter and GObject-based libraries, relying on components including the GObject Introspection repository, typelib metadata produced by build tools like GIR (GObject Introspection Repository), and runtime libraries such as libgirepository, libffi, and the Python runtime. The architecture mirrors the layering seen in stacks used by GNOME Shell, where high-level interfaces from GIO and GTK+ are mapped onto Python classes and functions. Runtime generation of proxies supports libraries ranging from AT-SPI (Assistive Technology Service Provider Interface) services to multimedia frameworks like GStreamer and system services like systemd clients.
Typical usage patterns appear in GUI, multimedia, and system utilities. Example workflows follow patterns used by applications from GNOME Software and Totem (media player), registering signal handlers and interacting with objects from GTK+ 3, GLib, GIO, and GStreamer. Code samples often import modules such as gi.repository.Gtk and gi.repository.GLib, create windows and widgets, and run the main loop similarly to projects by contributors at Canonical (company) and Red Hat. Bindings are used in cross-platform projects that run on Linux, FreeBSD, macOS, and Microsoft Windows; developers from GNOME Project and independent maintainers publish examples and how-tos informed by upstream documentation practices.
PyGObject exposes a wide collection of GObject-based libraries including GTK variants, GStreamer, GIO, GLib, ATK, Pango, Cairo, NetworkManager, BlueZ, ModemManager, Telepathy stacks, and multimedia backends used by projects like Rhythmbox, Totem (media player), and PulseAudio. It interoperates with language ecosystems and frameworks employed by organizations such as Mozilla Foundation (for multimedia), Canonical (company) (for desktop tooling), and Collabora (for multimedia and office integration). The binding strategy resembles those applied in other introspection-driven bindings used in projects across Freedesktop.org.
PyGObject is packaged by major distributions including Debian, Ubuntu, Fedora, openSUSE, and Arch Linux and is available via language package managers when bundled into platform-specific installers used by GNOME Builder and third-party IDEs. Installation commonly uses distribution packages that include typelib metadata produced by build systems used by projects like Meson and GNOME Build Suite, while upstream release artifacts follow practices similar to other GNOME components distributed through GNOME Software and release channels coordinated with Freedesktop.org packaging guidelines.
Development and maintenance occur within the GNOME Project and broader Freedesktop.org community, with contributors from companies such as Red Hat, Canonical (company), Collabora, and individuals active in GNOME Foundation mailing lists, Bugzilla workflows, and version control hosted on platforms historically used by GNOME contributors. Governance follows community-driven norms common to projects like GTK+ and GStreamer, including consensus-based decision making, contribution workflows, and release coordination with downstream distributors such as Debian and Fedora.
Category:GNOME Category:Python (programming language) bindings Category:Free software