File: using.txt

package info (click to toggle)
python-btsutils 0.3-1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 172 kB
  • ctags: 116
  • sloc: python: 558; makefile: 35
file content (67 lines) | stat: -rw-r--r-- 2,263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Bug object
----------

The Bug class defined in btsutils.bug is used to store the available
data of a bug report. It has the following attributes, with get and
set methods: Bug, Package, Summary, Status, Severity, Submitter, Tags
and UserTags.


Query Strings
-------------

A btsutils query is formed by a sequence of key:value pairs separated by
'&'. A bug matches a query if it matches all arguments, for other 
combinations (such as or'ed arguments), you need to join two (or more) 
queries (see below). The following keys are valid:

bug:<bugnumber>         		Bug number
src:<source>            		Source package
pkg:<package>           		Binary package
maint:<e-mail>          		Maintainer e-mail address
from:<e-mail>           		Submitter e-mail address
usertag:<user> <tag> [tag2 ...]		Usertags

If a bug number is specified, the other arguments on the same query are
ignored.

It's possible to join more than one query by delimiting each of them
through parenthesis, and linking them with one of the valid conectives:

&	returns all bugs matching both queries
|	returns all bugs matching one of the queries
+	returns all bugs matching one of the queries
-	returns all bugs on the first query and not on the second


Backend-agnostic debbugs interaction
------------------------------------

This is the preferred way to use btsutils. The class debbugs,
defined on the module btsutils.debbugs provides the following 
methods to query bug reports:

* setUsers(users): Set the BTS users
  users: list of users

  This function sets a list of BTS users. This is used to
  get usertags.

* get(bugnumber): Get a bug report through its number
  bugnumber: Number of the bug to get
  Returns a Bug object with the bug report data.

  See src/btsutils-get.py for an usage example.

* query(btsquery): Get a list of bug reports matching a query string
  btsquery: Query string on the syntax explained above
  Returns a list of Bug objects

  See src/btsutils-query.py for an usage example.

Debbugs interaction through specific backends
---------------------------------------------

If you need to use a specific backend to access a debbugs server,
you can use the btsutils.html and btsutils.soap modules. Please see
the source for more details about their API.