Skip to content

Instantly share code, notes, and snippets.

@kaorimatz
Created August 3, 2012 06:09
Show Gist options
  • Save kaorimatz/3244975 to your computer and use it in GitHub Desktop.
Save kaorimatz/3244975 to your computer and use it in GitHub Desktop.
List all keyring items
#!/bin/env python
def main():
import gnomekeyring
for keyring in gnomekeyring.list_keyring_names_sync():
for id in gnomekeyring.list_item_ids_sync(keyring):
item = gnomekeyring.item_get_info_sync(keyring, id)
print 'display name: ' + item.get_display_name()
print 'secret: ' + item.get_secret()
print 'attributes: '
for name, value in gnomekeyring.item_get_attributes_sync(keyring, id).items():
print ' %s = %s' % (name, value)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment