cython wrapping gpgme WAS: Thoughts on GnuPG and automation
hans at guardianproject.info
Mon Mar 9 20:27:10 CET 2015
> On 03/03/15 14:29, Hans of Guardian wrote:
>> It is actually more difficult to wrap GPGME in Java than to have just
>> rewritten GPGME in Java. GPGME is a fine API for C/C++, it is a bad
>> API for other languages. You end up with an API that feels like a C
>> API forced into the language, e.g. Java, python, etc. That makes for
>> more coding mistakes because it feels foreign to the programmer.
>> More mistakes means more security issues.
> I have no idea about the Java tooling for interfacing to external
> libraries, but (after seeing so many complaints on the mailing list)
> I've recently started to work on Python bindings to GPGME using Cython,
> and so far it has been an extremely smooth process and the resulting
> Python API feels quite pythonic (I haven't started with the asynchronous
> calls yet, those will probably be harder to map in a pythonic way).
> The fact that writing the bindings is quite easy, is due indeed to the
> fact that GPGME is a fine API for C (and to Cython to a large extent).
There are other C-Python wrappers of GPGME, like pyme. I hope you're aware of
those, and have studied them. One thing that GnuPG suffers from is many
people starting their own wrappers, but few people finishing them or
contributing to existing ones. That is not a sustainable situation.
PGP fingerprint: 5E61 C878 0F86 295C E17D 8677 9F0F E587 374B BE81
More information about the Gnupg-users