Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: devel

GnuPG and Python

 

 

GnuPG devel RSS feed   Index | Next | Previous | View Threaded


buanzo at buanzo

Feb 23, 2009, 6:00 AM

Post #1 of 18 (1755 views)
Permalink
GnuPG and Python

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Group, just wondering... what python module would you recommend to use GPGME from within python?
Would you use GPGME at all, or...?

Thanks!

PS: Yes, I'm googling too. Maybe I can find my own answer, but I wonder about what you guys have to
say anyway. Sorry to bother!

- --
Arturo "Buanzo" Busleiman / Arturo Busleiman @ 4:900/107
Independent Linux and Security Consultant - SANS - OISSG - OWASP
http://www.buanzo.com.ar/pro/eng.html
Mailing List Archives at http://archiver.mailfighter.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJoqwOAlpOsGhXcE0RCozMAJ9pBiifT8YJ9TVjXhQtUZy6AOrPbwCdF8gN
6O77pREvaGJudujctU9vxH8=
=RwUI
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


bernhard at intevation

Feb 24, 2009, 3:54 AM

Post #2 of 18 (1705 views)
Permalink
Re: GnuPG and Python [In reply to]

Am Montag, 23. Februar 2009 15:00:46 schrieb Arturo 'Buanzo' Busleiman:
> Hi Group, just wondering... what python module would you recommend to use
> GPGME from within python?

http://pyme.sourceforge.net/ , I do not know if there is another one
and I have used this one successfully a few times.

> Would you use GPGME at all, or...?

Of course, GPGME hides the complexity of executing and communicating with the
gnupg binaries on different platforms.

--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
Attachments: signature.asc (0.19 KB)


buanzo at buanzo

Feb 24, 2009, 11:48 AM

Post #3 of 18 (1707 views)
Permalink
Re: GnuPG and Python [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Bernhard Reiter wrote:
> http://pyme.sourceforge.net/ , I do not know if there is another one
> and I have used this one successfully a few times.

I got to the same choice, yesterday. Thanks for the confirmation, Bernhard!

- --
Arturo "Buanzo" Busleiman / Arturo Busleiman @ 4:900/107
Independent Linux and Security Consultant - SANS - OISSG - OWASP
http://www.buanzo.com.ar/pro/eng.html
Mailing List Archives at http://archiver.mailfighter.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJpE7xAlpOsGhXcE0RCpASAJ0Qu9MQmHkwE5j49b7fFyZ/okXlPwCfaB7j
yYXRdyJTR6j23D7qCW254fs=
=TZi/
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


gpgme at katehok

Feb 25, 2009, 3:25 PM

Post #4 of 18 (1698 views)
Permalink
Re: GnuPG and Python [In reply to]

Arturo 'Buanzo' Busleiman wrote:
> Bernhard Reiter wrote:
>
>> http://pyme.sourceforge.net/ , I do not know if there is another one
>> and I have used this one successfully a few times.
There's also http://py-gnupg.sourceforge.net/ which does not use GPGME
but executes gpg directly instead. Unfortunately, I don't have much
experience with it.

Cheers,
Igor


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


buanzo at buanzo

Feb 25, 2009, 3:33 PM

Post #5 of 18 (1698 views)
Permalink
Re: GnuPG and Python [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Igor Belyi wrote:
> There's also http://py-gnupg.sourceforge.net/ which does not use GPGME
> but executes gpg directly instead. Unfortunately, I don't have much
> experience with it.

I will take a look at it, too. Considering the very simple operations I have to perform, maybe using
GPGME is an overkill, too... Thanks Igor!

- --
Arturo "Buanzo" Busleiman / Arturo Busleiman @ 4:900/107
Independent Linux and Security Consultant - SANS - OISSG - OWASP
http://www.buanzo.com.ar/pro/eng.html
Mailing List Archives at http://archiver.mailfighter.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJpdVRAlpOsGhXcE0RCiWRAJ9xm8T+XCoM8ZqKQUSuD7/qaxM2jgCZATy+
Xv1rNnjmQoW2JOhgWI4wYxc=
=gllg
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


bernhard at intevation

Feb 25, 2009, 11:39 PM

Post #6 of 18 (1692 views)
Permalink
Re: GnuPG and Python [In reply to]

Am Donnerstag, 26. Februar 2009 00:33:37 schrieb Arturo 'Buanzo' Busleiman:
> Igor Belyi wrote:
> > There's also http://py-gnupg.sourceforge.net/ which does not use GPGME
> > but executes gpg directly instead.

Igor, you are confirming that there is only one python gpgme interface
as py-gnupg does not seem to use gpgme. There are a couple of other non-gpgme
python interface attempts. (Which I am too lazy too look up right now.)

> I will take a look at it, too. Considering the very simple operations I
> have to perform, maybe using GPGME is an overkill, too...

Arturo,
I still recommend using gpgme, even for the simplest operation because the
fork and exe really never is simple.

Bernhard



--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
Attachments: signature.asc (0.19 KB)


wk at gnupg

Feb 26, 2009, 12:09 AM

Post #7 of 18 (1694 views)
Permalink
Re: GnuPG and Python [In reply to]

On Thu, 26 Feb 2009 00:33, buanzo [at] buanzo said:

> I will take a look at it, too. Considering the very simple operations I have to perform, maybe using
> GPGME is an overkill, too... Thanks Igor!

FWIW: I don't think that GPGME is overkill. Instead it offers you an
easy way for better performance because eventually we will implement a
co-process scheme so that a running gpg process can be used for more
than one operation.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


buanzo at buanzo

Feb 26, 2009, 2:58 AM

Post #8 of 18 (1696 views)
Permalink
Re: GnuPG and Python [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Werner Koch wrote:
> FWIW: I don't think that GPGME is overkill. Instead it offers you an
> easy way for better performance because eventually we will implement a
> co-process scheme so that a running gpg process can be used for more
> than one operation.

Yes, with that detail in mind, then going GPGME seems like the best option. Thanks for the insight,
team.

- --
Arturo "Buanzo" Busleiman / Arturo Busleiman @ 4:900/107
Independent Linux and Security Consultant - SANS - OISSG - OWASP
http://www.buanzo.com.ar/pro/eng.html
Mailing List Archives at http://archiver.mailfighter.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJpnXIAlpOsGhXcE0RCngRAJ4rww3yo00lwunA95yajWiRKHRTQACbBMEb
OPtHV4fltrCfgC1teyeReRc=
=4QZ0
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


tmz at pobox

Feb 26, 2009, 6:24 AM

Post #9 of 18 (1692 views)
Permalink
Re: GnuPG and Python [In reply to]

Bernhard Reiter wrote:
> Igor, you are confirming that there is only one python gpgme
> interface as py-gnupg does not seem to use gpgme. There are a couple
> of other non-gpgme python interface attempts. (Which I am too lazy
> too look up right now.)

There is also pygpgme: https://launchpad.net/pygpgme

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Going to hell when I die would just be redundant.


bernhard at intevation

Mar 2, 2009, 5:55 AM

Post #10 of 18 (1664 views)
Permalink
Re: GnuPG and Python [In reply to]

Am Donnerstag, 26. Februar 2009 15:24:22 schrieb Todd Zullinger:
> Bernhard Reiter wrote:
> > there is only one python gpgme interface

http://pyme.sourceforge.net/

> >as py-gnupg does not seem to use gpgme. There are a couple
> > of other non-gpgme python interface attempts. (Which I am too lazy
> > too look up right now.)

> There is also pygpgme: https://launchpad.net/pygpgme

Oh, you are right. I've missed that one.
I wonder what the differences are between pyme and pygpgme.

Did anyone try both? Both seem to not have reached 1.0 it would be cool to
have at least one python binding that work really well.
James, Igor?

Best Regards,
Bernhard

--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
Attachments: signature.asc (0.19 KB)


james at jamesh

Mar 2, 2009, 6:28 AM

Post #11 of 18 (1673 views)
Permalink
Re: GnuPG and Python [In reply to]

On Mon, Mar 2, 2009 at 8:55 AM, Bernhard Reiter <bernhard [at] intevation> wrote:
> Am Donnerstag, 26. Februar 2009 15:24:22 schrieb Todd Zullinger:
>> Bernhard Reiter wrote:
>> > there is only one python gpgme interface
>
> http://pyme.sourceforge.net/
>
>> >as py-gnupg does not seem to use gpgme. There are a couple
>> > of other non-gpgme python interface attempts. (Which I am too lazy
>> > too look up right now.)
>
>> There is also pygpgme: https://launchpad.net/pygpgme
>
> Oh, you are right. I've missed that one.
> I wonder what the differences are between pyme and pygpgme.
>
> Did anyone try both?  Both seem to not have reached 1.0 it would be cool to
> have at least one python binding that work really well.
> James, Igor?

Don't worry too much about the version number of pygpgme: it is quite
stable. It implements almost all of the gpgme 1.0 API, but is missing
a few of the bits introduced in 1.1. It is currently used for the PGP
processing done by Launchpad and has been quite stable.

James.

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


tmz at pobox

Mar 2, 2009, 6:59 AM

Post #12 of 18 (1663 views)
Permalink
Re: GnuPG and Python [In reply to]

Bernhard Reiter wrote:
> I wonder what the differences are between pyme and pygpgme.

I *think* (having only read about pyme briefly a few months or more
ago) that pyme is a bit more of a raw set of bindings to gpgme, being
swig based. While pygpgme feels a little more "pythonic" in its
design. Of course, I've only used pygpgme lightly and pyme not at
all. And both are still quite young and could change as they mature.

I know that yum (the Fedora, RHEL, and CentOS update tool) uses
pygpgme for many of its gpg needs. Other than that, I haven't run
into many tools using either.

Hopefully I've not misrepresented or maligned the work of either the
pyme or pygpgme authors. :)

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If quizzes are quizzical, what are tests?


buanzo at buanzo

Mar 2, 2009, 7:03 AM

Post #13 of 18 (1666 views)
Permalink
Re: GnuPG and Python [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Todd Zullinger wrote:
> Hopefully I've not misrepresented or maligned the work of either the
> pyme or pygpgme authors. :)

You actually provided quite an interesting feedback. Thank you Todd!

- --
Arturo "Buanzo" Busleiman / Arturo Busleiman @ 4:900/107
Independent Linux and Security Consultant - SANS - OISSG - OWASP
http://www.buanzo.com.ar/pro/eng.html
Mailing List Archives at http://archiver.mailfighter.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkmr9TQACgkQAlpOsGhXcE0ymACfcJ2c1TUXJXEDX9v3umklKUQq
X78AmwWb5q0xHVM8HGuXftYVZzfAjb8t
=lTuR
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


belyi at users

Mar 2, 2009, 8:23 AM

Post #14 of 18 (1669 views)
Permalink
Re: GnuPG and Python [In reply to]

Todd Zullinger wrote:
> Bernhard Reiter wrote:
>
>> I wonder what the differences are between pyme and pygpgme.
>>
>
> I *think* (having only read about pyme briefly a few months or more
> ago) that pyme is a bit more of a raw set of bindings to gpgme, being
> swig based. While pygpgme feels a little more "pythonic" in its
> design. Of course, I've only used pygpgme lightly and pyme not at
> all. And both are still quite young and could change as they mature.
>
> I know that yum (the Fedora, RHEL, and CentOS update tool) uses
> pygpgme for many of its gpg needs. Other than that, I haven't run
> into many tools using either.
>
> Hopefully I've not misrepresented or maligned the work of either the
> pyme or pygpgme authors. :)
>
Yes, I think this is the right assessment of the implementation
difference between pyme and pygpgme - pyme uses SWIG to have python
binding for gpgme functions and then uses extra python classes/packages
for pythonizing GPGME interface where as pygpgme does most of the work
using Pyhton C API directly. In short, pyme hides behind SWIG from
handling difference in Python and GPGME versions, where as pygpgme takes
approach of having less dependencies on another product.

I didn't know that yum uses pygpgme since I'm more used to the Debian
distribution which in its turn has pyme package but no pygpgme. As a
result, Linux distribution could be another factor for choosing one
versus another. Although, I wish Debian could pick up pygpgme in its
package set as well to have a better test ground for usability of both.

That's my couple cents.
Cheers,
Igor, the PyMe maintainer.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


james at jamesh

Mar 2, 2009, 9:31 AM

Post #15 of 18 (1667 views)
Permalink
Re: GnuPG and Python [In reply to]

On Mon, Mar 2, 2009 at 11:23 AM, Igor Belyi <belyi [at] users> wrote:
> Yes, I think this is the right assessment of the implementation difference
> between pyme and pygpgme - pyme uses SWIG to have python binding for gpgme
> functions and then uses extra python classes/packages for pythonizing GPGME
> interface where as pygpgme does most of the work using Pyhton C API
> directly. In short, pyme hides behind SWIG from handling difference in
> Python and GPGME versions, where as pygpgme takes approach of having less
> dependencies on another product.

The choice not to use swig was not an issue of dependencies, but
rather bad experience with it in the past. I've seen too many memory
leaks or crasher bugs in swig based bindings to trust it. I needed a
binding that could be used by a long running web service without
causing it to run out of memory.


> I didn't know that yum uses pygpgme since I'm more used to the Debian
> distribution which in its turn has pyme package but no pygpgme. As a result,
> Linux distribution could be another factor for choosing one versus another.
> Although, I wish Debian could pick up pygpgme in its package set as well to
> have a better test ground for usability of both.

I agree it'd be good to get pygpgme packaged for Debian/Ubuntu. I
might try packaging it in my PPA when I've got some spare time.

James.

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


belyi at users

Mar 2, 2009, 9:39 AM

Post #16 of 18 (1672 views)
Permalink
Re: GnuPG and Python [In reply to]

James Henstridge wrote:
> On Mon, Mar 2, 2009 at 8:55 AM, Bernhard Reiter <bernhard [at] intevation> wrote:
>
>> Am Donnerstag, 26. Februar 2009 15:24:22 schrieb Todd Zullinger:
>>
>>> Bernhard Reiter wrote:
>>>
>>>> there is only one python gpgme interface
>>>>
>> http://pyme.sourceforge.net/
>>
>>
>>>> as py-gnupg does not seem to use gpgme. There are a couple
>>>> of other non-gpgme python interface attempts. (Which I am too lazy
>>>> too look up right now.)
>>>>
>>> There is also pygpgme: https://launchpad.net/pygpgme
>>>
>> Oh, you are right. I've missed that one.
>> I wonder what the differences are between pyme and pygpgme.
>>
>> Did anyone try both? Both seem to not have reached 1.0 it would be cool to
>> have at least one python binding that work really well.
>> James, Igor?
>>
>
> Don't worry too much about the version number of pygpgme: it is quite
> stable. It implements almost all of the gpgme 1.0 API, but is missing
> a few of the bits introduced in 1.1. It is currently used for the PGP
> processing done by Launchpad and has been quite stable.
>
I'd like to join James in confirming that PyMe in its turn is also
stable. :o) It does not miss any of the gpgme bits due to the usage of
the SWIG for the build but the main stopper for it to become 1.0 is the
lack of good pydoc documentation for its own and generated from gpgme
classes and methods. Plus, the current runtime dependency it has on
Windows needs some improvement.

Cheers,
Igor

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


buanzo at buanzo

Mar 2, 2009, 10:59 AM

Post #17 of 18 (1668 views)
Permalink
Re: GnuPG and Python [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

James Henstridge wrote:
> Don't worry too much about the version number of pygpgme: it is quite
> stable. It implements almost all of the gpgme 1.0 API, but is missing
> a few of the bits introduced in 1.1. It is currently used for the PGP
> processing done by Launchpad and has been quite stable.

I just tried it out. Didn't work from the start. I had to modify the Makefile to use python 2.5
instead of default 2.4. After that, it plain worked.

- --
Arturo "Buanzo" Busleiman / Arturo Busleiman @ 4:900/107
Independent Linux and Security Consultant - SANS - OISSG - OWASP
http://www.buanzo.com.ar/pro/eng.html
Mailing List Archives at http://archiver.mailfighter.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkmsLI4ACgkQAlpOsGhXcE2V2QCbB4C0SHShyTjlKloh8t+vT47r
R5cAn0rhNHso+vMreqvLmlz1lCSokIrl
=dKlo
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


bernhard at intevation

Mar 2, 2009, 11:32 PM

Post #18 of 18 (1659 views)
Permalink
Re: GnuPG and Python [In reply to]

Igor, James,

thanks for your responses and for doing nice python packages of gpgme
as Free Software!

I suggest you should both use the 1.0 label for the next release. Think about
that release numbers are mainly for journalists. ;)

Am Montag, 2. März 2009 18:31:21 schrieb James Henstridge:
> On Mon, Mar 2, 2009 at 11:23 AM, Igor Belyi <belyi [at] users>
wrote:
> > Yes, I think this is the right assessment of the implementation
> > difference between pyme and pygpgme - pyme uses SWIG to have python
> > binding for gpgme functions and then uses extra python classes/packages
> > for pythonizing GPGME interface where as pygpgme does most of the work
> > using Pyhton C API directly. In short, pyme hides behind SWIG from
> > handling difference in Python and GPGME versions, where as pygpgme takes
> > approach of having less dependencies on another product.
>
> The choice not to use swig was not an issue of dependencies, but
> rather bad experience with it in the past.

We (at Intevation) also found that swig was a good idea in 2000 and used it
for pyshapelib. Later we found it was more getting in the way, so we probably
will not use it for the next python wrapper we do. And pyshapelib has
meanwhile be ported to be native.

> I've seen too many memory
> leaks or crasher bugs in swig based bindings to trust it.  I needed a
> binding that could be used by a long running web service without
> causing it to run out of memory.

So far I did not try pygpgme yet, but pyme which worked fine for a couple of
short running scripts. I know that roundup 1.4 uses pyme and roundup often is
run as a long term server process. This is a good sign for pyme.

Best,
Bernhard


--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
Attachments: signature.asc (0.19 KB)

GnuPG devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.