pygobject3

Python bindings for GObject-based libraries using introspection

brewmacoslinux
Try with needOr install directly
Source

About

GNOME Python bindings (based on GObject Introspection)

Commands

pygobject3

Examples

Import and use GObject introspection in a Python script$ python3 -c "import gi; gi.require_version('Gtk', '3.0'); from gi.repository import Gtk; print('GTK bindings available')"
Create a simple GTK3 application window using PyGObject$ python3 -c "import gi; gi.require_version('Gtk', '3.0'); from gi.repository import Gtk; window = Gtk.Window(); window.set_title('Hello'); print('Window created')"
List available GObject introspection namespaces$ python3 -c "import gi; gi.require_version('GObject', '2.0'); from gi.repository import GObject; print('GObject available')"