Is there a gi.repository documentation for python? Is there a gi.repository documentation for python? python python

Is there a gi.repository documentation for python?


Yes, I found a site that contains documentations for all python bindings of perhaps all GNOME projects that are supported by the python gi.repository module or the Python GObject Introspection module:http://lazka.github.io/pgi-docs/

The one specifically for GTK is:http://lazka.github.io/pgi-docs/Gtk-3.0/index.html

There is also documentation specific to the gi package provided by PyGObject:https://pygobject.readthedocs.io/en/latest/guide/api/api.html

I hope you find these links helpful


I think you're looking for this.

It's a work in progress, but basically is a tutorial for Gtk3 in python. I doesn't really cover any other thing aside from Gtk widgets (so no Glib, for example), but it's still useful to get started.


Generally speaking, you should be able to use the C library documentation as your main reference. The naming conversions between the C functions and their Python versions are quite consistent, so it's straight-forward in most cases. I would not expect to see Python-specific Gtk-via-introspection documentation.

I occasionally had trouble finding, for example, constants at first. In this case, using iPython's tab-completion to search the Gtk, Gdk and Gobject namespaces was invaluable. There are a few rare cases in which introspection is impossible and, at least in the last version I was working with, they hadn't been manually implemented (can't remember exactly which functions), so there's not much you can do with those; I had to dig into the gi.repository source to verify these cases.