PGI - Pure Python GObject Introspection Bindings
WARNING: Lots of things are not implemented/supported.
See the 'examples' directory for working examples. Anything else will probably not work.
License: LGPL 2.1+
- CPython 2.7 or CPython 3.3+ or PyPy 1.9+ or PyPy3 2.3+
- libgirepository 1.0
- cffi 0.8+ (optional, but needed for tests)
- cairocffi 0.4+ (optional, for cairo support)
from pgi.repository import Gtk, GObject
import pgi pgi.install_as_gi() from gi.repository import Gtk, GObject
Typelibs will be loaded from paths in the environment variable GI_TYPELIB_PATH and /usr/lib/girepository-1.0/.
Shared libraries from paths in LD_LIBRARY_PATH and the default system search paths (see dlopen(3)).
- PGI docs:
- Autogenerated GI docs:
- ./setup.py test will run unit tests using PGI and PyGObject
- ./setup.py test --pgi-only to skip PyGObject tests
- ./setup.py test --filter=StructTest to run tests which include StructTest (regexp)
./tests/libs/ includes additional libraries that will be used for testing if present. Call make in ./tests/libs/ to build them.
- ./setup.py quality will run pep8 and pyflakes tests
- ./setup.py coverage will create a test coverage report