What is the gnome keyring api for PyGi?
Does anyone where I can find the gnome keyring api in PyGi?
I used to do:
import gnomekeyring
Now I want to use the new python/gobject introspection so it w开发者_C百科ould be something like:
from gi.repository import GnomeKeyring
But I can't find the module to load. Does someone know if/how I can access the Gnome Keyring api with python gobject introspection?
To access the Secret Service (gnome-keyring) you should use the libsecret (new library replacing libgnome-keyring)
It has builtin support for Gobject Introspection so this should work:
from gi.repository import Secret
PyGI still under development and adaption so it still doesn't have any official documentation or API reference. Every time I need to try something with PyGI I check the C Gnome Development Reference there you can find the C documentation for gnome-keyring. It seems to be very similar to the old gnomekeyring.
精彩评论