skillfed

PyGObject

Python bindings for GObject Introspection

pygobject v3.56.3 630.2K downloads/30d#5,664 on PyPI
Copyleft license GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted… (full text in the JSON record) Active released

What it is and what it does

PyGObject is a bridge between Python and the GObject type system, which underlies most GNOME libraries and many other C-based projects. It uses GObject Introspection to automatically generate Python bindings for libraries written in C, allowing developers to call GObject-based APIs directly from Python code. The package supports Python 3.10+ and PyPy3, and works across Linux, Windows, and macOS.

Typically used to build desktop applications with GTK, multimedia applications with GStreamer, or web applications with WebKitGTK. Because it wraps compiled C libraries, installation requires a working C compiler and the development headers for the underlying libraries you want to use. The bindings are generated dynamically at runtime via introspection metadata, so you gain access to new library versions without waiting for manual binding updates.

Use it for:

  • Build GTK-based desktop applications with native look and feel on Linux, Windows, and macOS.
  • Create multimedia applications using GStreamer for audio and video playback.
  • Develop web-based applications using WebKitGTK as an embedded browser engine.
  • Access system services and file I/O through GLib and GIO from Python.
  • Integrate Python scripts with GNOME desktop environment components.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyGObject provides Python bindings for GObject-based libraries such as GTK, GStreamer, WebKitGTK, GLib, and GIO, enabling Python developers to build graphical and multimedia applications.

Yes, if you need to build desktop or multimedia applications using GObject-based libraries. The high install friction (requires C compiler and system headers) and copyleft license are the main trade-offs. The package is actively maintained, has no known vulnerabilities, and is the standard way to access GTK and GStreamer from Python. Not suitable if you cannot meet the compilation requirements or need a permissive license for proprietary redistribution.

Install

pygobject on PyPI

pip

pip install pygobject

uv

uv add pygobject

poetry

poetry add pygobject

Installing PyGObject

Before you install

Installation requires a C compiler and system development headers; the package is distributed only as source. Maintenance is active with a recent release within the last 98 days.

License in practice

Licensed under LGPLv2.1+, a copyleft license permitting use in both free and proprietary software provided you distribute source code and allow relinking. Derivative works must be licensed under the same terms.

Quickstart

pip install PyGObject

Then import and use bindings for GObject-based libraries via introspection metadata at runtime.

Requires a C compiler, system development headers, and underlying GObject libraries (GTK, GLib, etc.) installed on the host system.

Verify before relying

  • Whether pre-built wheels are available for common platforms to avoid compilation.
  • Performance characteristics when wrapping large GObject hierarchies or frequent callback invocations.
  • Compatibility details with specific GTK versions and other GObject library versions.
  • Specific usage patterns and code examples for common GObject-based libraries.

Package facts

License GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted… (full text in the JSON record) (copyleft)
Python support supports the current Python release (>=3.10)
Install friction high — source build required
Runtime dependencies 1 — pycairo
Maintenance actively maintained — 98 days since the last release
First released
Downloads 630,220/month — #5,664 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pygobject-3.56.3.tar.gz

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Operating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: CProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python Modules

Tags

gtk python bindingsgstreamer python interfacegobject introspection bindingspython gui developmentgnome library python wrapperwebkit python bindingsglib python bindings
gtk-bindingsgobject-introspectiondesktop-gui

More Python Modules packages