Python bindings for GPGME library enabling GPG operations
Python bindings for gpgme
gpgmepy$ python3 -c "import gpgme; ctx = gpgme.Context(); print([key.uids[0].uid for key in ctx.keylist()])"$ python3 -c "import gpgme; ctx = gpgme.Context(); key = list(ctx.keylist('recipient@example.com'))[0]; ctx.encrypt([key], open('plaintext.txt', 'r'), open('encrypted.gpg', 'wb'))"$ python3 -c "import gpgme; ctx = gpgme.Context(); ctx.decrypt(open('encrypted.gpg', 'rb'), open('decrypted.txt', 'wb'))"