Zenhack.net

python-gpgmime

05 Sep 2015

I spent a good chunk of this past week building a python library to manage PGP MIME email, as specified in RFC3156. Martin and I have been tossing around ideas for better user interfaces around PGP, and while we’re still figuring out a lot of things, it became clear that this was something we’d need.

It’s a straightforward wrapper around python-gnupg, which just adds support for doing signing, verification, encryption, and decryption. python-gnupg is reasonably well documented, and I intend to maintain a similar standard for python-gpgmime.

There’s another package pgp-mime, which supposedly supports the same functionality, but I found the docs unsatisfactory, and it doesn’t look like it’s been maintained for a few years. Also, frankly, I didn’t even bother to look for other libraries until I was pretty far into the project, for two reasons:

  1. I’ve seen enough different mail clients roll their own support for this that I just assumed there was nothing good out there (my library borrows some code from alot).
  2. It’s such a small thing that I didn’t feel the need to do a lot of research before undertaking it.

It’s still a bit sloppy, but it’s coming together.

Cheers,

-Ian