This week in Launchpad’s web API

This status report was put off until today because the edge site was frozen. This update is huge. We’ve made one change to launchpadlib, exposed a whole lot of Launchpad’s project registry, and published branches for the first time.

Since the development cycle is over, the next update will probably be in two weeks.

Team restriction lifted

You no longer need to be a member of the beta testers team to use the web service. We decided that the restriction didn’t make sense, given that nobody’s going to use the web service by accident. This doesn’t mean that the web service is out of beta; we’ll make a much bigger deal of it when that happens.


I fixed a longstanding annoyance in launchpadlib. This code will now work:

>>> launchpad.projects['firefox'].releases[0]

Previously you would have had to slice the list and then index the slice:

>>> launchpad.projects['firefox'].releases[:1][0]

New Top-Level Collections

We’ve published the list of project groups as a new top-level collection.

>>> launchpad.project_groups['mysql'].name
>>> [ for group in launchpad.project_groups[:2]]
[u'launchpad-project', u'aep']

>>> [ for group in"mysql")]
[u'tx', u'wordpress-project', u'samba-project', u'openarchaeology',
u'mysql', u'linterra']

We’ve also published the list of distributions.

>>> launchpad.distributions['ubuntu'].name

>>> [ for distro in launchpad.distributions][:2]
[u'ubuntu', u'elbuntu']

The Pillar Set

We’ve published the Launchpad pillar set. This is a pretty confusing name but we haven’t found a better one yet. “Pillar” is a generic term that encompasses project, project group, and distribution. If you go to the Launchpad homepage you’ll see a list of “Featured projects”. These are actually featured pillars: Extreme Tux Racer is a featured project, MySQL is a featured project group, and Ubuntu is a featured distribution. You can get access to the list of featured pillars with code like this:

>>> [ for pillar in launchpad.pillars.featured_pillars[:5]]
[u'anewt', u'awn', u'bauble', u'bzr', u'do']

You can also use the pillar set to do a unified search across projects, project groups, and distributions. A search for ‘ubuntu’ will pick up the ‘ubuntu’ distribution, the ‘ubuntu-live-support’ project group, and the ‘ubuntu-dev-docs’ project.

Unlike with, say, the bug set, you can’t just grab a bunch of pillar objects from inside launchpad.pillars. The only interesting things about launchpad.pillars are the things beneath it: the pillar search and the list of featured pillars.


The code team has done some web service work, and you can now get basic information about a project’s registered bzr branches.

>>> branch = launchpad.projects['firefox'].branches[0]
>>> branch.title
u'Firefox Trunk Package'

Other Newly Published Objects

We now publish a project’s release series, releases, and the files associated with those releases.

>>> release_series = launchpad.projects['firefox'].series[1]
>>> release_series.title
u'Mozilla Firefox Series: 1.5'
>>> release = release_series.releases[0]
>>> release.version
>>> release_file = release.files[0]
>>> release_file.date_uploaded
[binary data]

Leave a Reply