Warning: I no longer maintain this module. Check the GnuPrivacyGuard Wiki page to see if someone is maintaining a new version.

GPG.py is a simple class for running GNU Privacy Guard in batch mode. Unlike the original email encryption program, the no-longer-free-software PGP, GnuPG has a nicely defined interface for being run as a subprocess. When the --status-fd option is used, the output contains additional lines, prefixed with '[GNUPG:]', in various carefully specified formats intended to be parsed by other programs. See the doc/DETAILS file in the GnuPG source distribution for an explanation of the format.

GPG.py contains a GPGSubprocess class which handles starting a GPG subprocess and feeding it output. NOTE: Currently only verification of signatures is implemented, because that's all I needed.

You can record comments and patches about the module in the Python Wiki on the GnuPrivacyGuard page.

Download the code

GPG.py [5K] [Signature]


[Contact me]