Search code examples
pythongnupg

Is there any standalone pgp implementation in python?


By 'standalone' I mean a module that allows my application to manage its own database of keys rather than resourcing to the one associated to the user account of the operative system where it runs?

I red python-gnupg's docs, if I understood it correctly it relies on the user local keys database.

I'd be happy with a solution that would work on linux. Support for other platforms has low priority at the moment.


Solution

  • Using python-gnupg both arguments are possible, keyring and gnupghome.

    The bonus for the home dir approach is, that not only another (public) keyring is used, but you'll use all files in that dedicated directory. If it doesn't exist, it will be created and populated on creation of the gnupg.GPG instance - nice and sane.