Last Comment Bug 774141 - Add generic Bugzilla Python client API
: Add generic Bugzilla Python client API
Status: RESOLVED WORKSFORME
[mach]
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Burak Yiğit Kaya [:BYK]
:
Mentors:
Depends on:
Blocks: machfeatures 774150 1003236 774149
  Show dependency treegraph
 
Reported: 2012-07-15 18:05 PDT by Gregory Szorc [:gps]
Modified: 2014-06-16 13:58 PDT (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Gregory Szorc [:gps] 2012-07-15 18:05:32 PDT
Per email discussions, we want to check a unified and generic Bugzilla client API written in Python into mozilla-central. This bug will track getting that landed. Feel free to move to whatever component is appropriate.
Comment 1 Jeff Hammel 2012-07-16 08:55:11 PDT
So there are several tools already written in python that have significant overlap.  See http://k0s.org/toolbox/?usage=bugzilla&language=python  IMHO, doing this right == making a best of breed that hopefully existing projects can start to use, not just yet-another-...

While I'm not familiar with all of these, but I can say the following seem to have implemented some of what is needed:

* http://hg.mozilla.org/users/mozilla_kewis.ch/hg-bugzilla/
* http://k0s.org/mozilla/hg/bzconsole 
* http://hg.mozilla.org/users/tmielczarek_mozilla.com/bzexport/
* https://github.com/LegNeato/bztools
* https://github.com/toolness/pybugzilla
* http://hg.mozilla.org/users/robarnold_cmu.edu/qimportbz

It'd be nice to move towards a single officially maintained library and maybe some front-end so that we can replace proliferation with innovation
Comment 2 Gregory Szorc [:gps] 2012-07-16 11:06:52 PDT
(In reply to Jeff Hammel [:jhammel] from comment #1)
> It'd be nice to move towards a single officially maintained library and
> maybe some front-end so that we can replace proliferation with innovation

Definitely. I believe this is more or less what we discussed in our offline email thread.
Comment 3 Burak Yiğit Kaya [:BYK] 2012-07-29 22:44:23 PDT
We're on it with Berker Peksag. Will take some time but we'll do it! =)
Comment 4 Josh Matthews [:jdm] 2012-08-23 10:36:28 PDT
I'm not sure how far you've gotten with this to date, but I came across https://github.com/toolness/pybugzilla while trawling through github. It could be a good project to expand upon.
Comment 5 Jeff Hammel 2012-08-23 15:35:01 PDT
(In reply to Josh Matthews [:jdm] from comment #4)
> I'm not sure how far you've gotten with this to date, but I came across
> https://github.com/toolness/pybugzilla while trawling through github. It
> could be a good project to expand upon.

Yep, this was mentioned in comment 1. I'd really like to see the several very similar libraries here combined to be a unified best of breed mozilla-official python client lib
Comment 6 Burak Yiğit Kaya [:BYK] 2012-08-27 01:02:51 PDT
Work is underway here: https://github.com/berkerpeksag/pyresto/tree/bugzilla (anyone is welcome to contribute). The main work is happening on https://github.com/berkerpeksag/pyresto/blob/bugzilla/pyresto/apis/bugzilla/models.py

Read-only API is around the corner and we hope to bring modification actions available soon after that.
Comment 7 Burak Yiğit Kaya [:BYK] 2012-08-28 04:47:32 PDT
Read-only api finished: https://github.com/BYK/pyresto/tree/master/pyresto/apis/bugzilla

Comments are welcome. Work continues for modify actions.
Comment 8 Gregory Szorc [:gps] 2012-08-28 13:10:38 PDT
The end-user API is so clean \o/

I haven't dug into the core of pyresto yet. Looks like a very handy library! I love how it hides transport details from the end user. This is exactly what a client library should look like!
Comment 9 Josh Matthews [:jdm] 2012-08-28 14:26:05 PDT
Agreed! I'm super pumped about what's already there so far.
Comment 10 Burak Yiğit Kaya [:BYK] 2012-11-23 23:59:50 PST
This is still underway. Just wanted to give a heartbeat. Now we are in the process of adding unit tests(https://github.com/BYK/pyresto/pull/41) and mutation support to the whole API(https://github.com/BYK/pyresto/pull/40). Open to any contributions and/or feedback!
Comment 11 Gregory Szorc [:gps] 2014-01-06 13:37:55 PST
I just found https://github.com/rail/build-autoland/blob/master/utils/bz_utils.py.
Comment 12 Gregory Szorc [:gps] 2014-01-06 16:27:29 PST
https://github.com/rail/build-autoland/blob/v2/autoland/bugzilla.py is a better version of the last comment.
Comment 13 Gregory Szorc [:gps] 2014-06-16 13:58:08 PDT
David Burns created a package: http://www.theautomatedtester.co.uk/blog/2014/introducing-bugsy-client-library-for-interacting-with-bugzilla.html

It looks very similar to one I started a few months back when writing a very simple Bugzilla crawler: https://bitbucket.org/indygreg/python-bzrest/src

I vote for Bugsy being the future.

Note You need to log in before you can comment on or make changes to this bug.