[Reportbug-maint] Python API to Access Debian BTS - python-btsutils vs python-debianbts

Bastian Venthur venthur at debian.org
Sat Aug 30 22:34:27 UTC 2008



Sandro Tosi schrieb:
> Hello guys,
> it's been a long time since this thread started and I'd like to revamp
> it a little.

[...]
> 
> I think that implement the full SOAP interface the BTS exposes won't
> be a big trouble; maybe we can involve Don in this discussion to
> spread some light on.
> 
> Apart from this, since I'm planning to "evaluate" a migration to SOAP
> BTS querying, did you guys come to an agreement about the future of
> the package? Will there be just one (let's call it the Official python
> binding for BTS SOAP) of the two currently in the archive? That would
> be interesting to have, to leverage your work and joint the effort on
> it.

Gustavo wrote on 2008-07-22:

> I second Bastian on using the SOAP interface; btsutils has some support
> to html parsing as SOAP was somewhat in development/maturing when I
> wrote it, but I don't think it's needed anymore.

so it looks like he would drop python-btsutils in favour for
python-debianbts. I still think reportbug should use the SOAP interface
instead of the html parsing, regardeless which package you choose. If
you decide to use debianbts I'm still happy to discuss an interface (if
you don't like the current one) and rewrite it so that reportbug and
reportbug-ng can use it. I don't know if I offered it before but I'd
also teammaintain that package so you don't have to fear that I change
something which might break reportbug.

In general I think it's a good thing that you evaluate the switch to
SOAP. I did it with reportbug-ng before and it's much more reliable now.
HTML-parsing is error prone, depends on the *webdesign* of the BTS and
takes many lines of code. The SOAP counterpart is straight forward and
easy to use.

If you want to play with the SOAP, just install python-debianbts and
play around. It's dead easy:

>>> import debianbts
>>> buglist = debianbts.get_bugs("package", "reportbug-ng")
>>> buglist
[420149, 458575, 477663, 464843, 435849, 476298, 491927, 416586, 495397,
431318, 489359, 492835, 479201, 457189, 496544, 435553, 494770, 433289,
431788, 445569, 452818, 432791, 434212, 478436, 448847, 474955, 431711,
458571, 433300, 433114, 494282, 492715, 416133, 439203, 440568, 433580,
482827, 432129, 445287, 448852, 457045]
>>> status = debianbts.get_status(buglist)
>>> for i in status:
...     print i

each status-object as attributes like, bugnumber, package, summary and
so on.


Cheers,

Bastian

-- 
Bastian Venthur                                      http://venthur.de
Debian Developer                                 venthur at debian org




More information about the Reportbug-maint mailing list