isislovecruft/python-gnupg — pull request #20 by garrettr (2013-09-09 03:58:44+00:00)
Title: Add GPG.search_keys

Implementation of `GPG.search_keys`, which allows users to search keyservers a la `--search-keys`. The API is pretty much identical to `GPG.recv_keys`. I based the parser implementation on ListKeys.

search_keys returns a list of search results. Each result is a dictionary with metadata about the key, including the keyid and a list of uids. The keyid can then be passed to `GPG.recv_keys` to retrieve the actual key. Metadata values are converted into useful Python data types wherever possible.

There is also a basic unit test.

This commit closes #19.