This week in Launchpad’s web API
Published by Leonard Richardson August 15, 2008 in API, Cool new stuff, General
Now that the Launchpad web service API has entered beta, I’ll be posting an update every week about the improvements we make to it. This way you’ll always know what’s going on, and you’ll see when something you want to do becomes possible.
Web service improvements
This week I made one major change to the web service itself. There’s now a special top-level resource that’s an alias to “you” on Launchpad. This is a nice convenience when you’re writing scripts for yourself, but it’s practically essential if other people are going to be running your program.
Here’s how to get a reference to the person who’s running the script, using launchpadlib, our Python interface to the web service.
>>> me = launchpad.me
>>> print me.name
leonardr
If you’re not using launchpadlib, GET the service root at https://api.staging.launchpad.net/beta/, and you’ll see the URL to this resource as ‘me_link’. When you GET that URL you’ll be redirected to your own user account.
launchpadlib improvements
I spent most of my time working on launchpadlib. Apart from some bugfixes and performance improvements that you won’t even notice, I made three big improvements.
Introspection
Previously, to see what capabilities a launchpadlib object had, you had to check the reference documentation. (That documentation is two weeks out of date, by the way; we’ll be fixing that next week.) Now you can just call dir() on an object, and all of its Launchpad-derived attributes and methods will show up in the list. If you only want to see the Launchpad attributes or methods and not all the internal launchpadlib stuff, you can check lp_attributes or lp_operations. This code shows what you can do with a launchpadlib person object:
>>> me.lp_attributes
['self_link', 'resource_type_link', 'longitude', ... 'homepage_content']
>>> me.lp_operations
['addMember', ... 'setLocation']
Slices
The second new feature is the ability to slice Launchpad collections as though they were Python lists. Here’s some code that gets the 10 most recently filed bugs in Launchpad.
>>> recent_bugs = launchpad.bugs[:10]
>>> [bug.id for bug in recent_bugs]
[258042, 258041, 258040, 258039, 258038, 258037, 258036, 258033, 258032, 258030]
Previously, the only way to do this was to iterate over launchpad.bugs and insert a break statement when you’d had enough, which was very awkward.
Loading from bookmarks
The third new feature is the ability to bookmark launchpadlib objects and go back to them later, the way you can bookmark web pages in your browser. Here’s launchpadlib code to acquire a bug.
>>> a_bug = launchpad.bugs[251497]
>>> print a_bug.title
Make it possible to instantiate a resource from a URL
I can play around with that bug all I want within a Python session, but if I exit the Python session the bug will disappear. If I want to get the bug back later, I’ll need to find it again from scratch. Unless I store the bug’s unique ID (also known as its URL).
>>> print str(a_bug)
https://api.staging.launchpad.net/beta/bugs/251497
At this point I can write that string to a file or database. Later on, a different process might come online and load the string back into memory. That process can get the bug object back by passing the bug’s URL into launchpad.load().
>>> a_bug = launchpad.load("https://api.staging.launchpad.net/beta/bugs/251497")
>>> print a_bug.title
Make it possible to instantiate a resource from a URL
Pretty simple stuff–people have been saving URLs and passing them around to each other for over fifteen years. The advantage of our web service’s design is that it gives you the same power in a scripted environment.
Upcoming work
Next week I plan to spend most of my time on behind-the-scenes performance improvements. You won’t notice anything if you use launchpadlib. If you’re writing your own client, you’ll know what I’m talking about when I say “ETag support.”
Meanwhile, Edwin Grubbs will be working to expose Launchpad’s project registry through the web service.
See you next week!
Launchpod episode 9: looking back at Launchpad 2.0 and how we do Launchpad QA
Published by Matthew Revell in Podcast
Launchpod: the Launchpad team podcast! Recorded at the Launchpad Releases team sprint in Longmont Colorado.
Hosts: Matthew Revell and Joey Stanford.
Theme: Obscurity by Barry Warsaw.
- 00.50: The value of sprints in a distributed team.
- 01.55: Looking back at the new features in Launchpad 2.0, including metrics on what went into 2.0. Plus a look ahead to the next set of Launchpad milestones.
- 10.20: A little on how we develop and test code for Launchpad.
- 12.15: Some of the Launchpad team went to OSCON. Joey talks about what they got up to.
- 15.33: What happens when a PPA package appears to be non-free software?
- 18.15: Diogo Matsubara talks about his QA work on Launchpad.
- 24.20: Introducing Ursula Junque the latest member of the Launchpad QA team!
Send us your ideas and questions to feedback@launchpad.net!
Legal Page Updates
Published by Joey Stanford August 12, 2008 in General, Notifications
Hi,
Today I’m happy to announce two changes which appear on the Launchpad Legal page.
- The Launchpad Logo, previously unlicensed, is now licensed as “Creative Commons Attribution-No Derivative Works 2.0 UK: England & Wales”. “No Derivative” was chosen to preserve our branding integrity.
- The Launchpad Help wiki documentation and the Launchpad News blog, previously unlicensed, are now licensed as “Creative Commons Attribution 2.0 UK: England & Wales”.
These changes have been made in response to our users and other commercial entities inquiring if they can display/reuse/remix these items. Previously, any non-Launchpad use required explicit permission (except as permitted by fair-use).
Please visit the Launchpad Legal page for the full details and links to the Creative Commons Licenses.
Inside the new Launchpad web service API
Published by Leonard Richardson August 9, 2008 in API, Cool new stuff
If you’ve been wanting to integrate Launchpad into your development tools, or create scripts that read and write Launchpad’s dataset, your wait is over. We’ve released the initial version of our RESTful web service API to the beta testing team. Now you can integrate with Launchpad using our Python library or by making simple HTTP requests.
No longer will you need to screen-scrape or write scripts that pretend to be a web browser; your programs will be able to communicate directly with Launchpad. Our support for OAuth means your users can delegate a subset of their Launchpad privileges to your program or website, without handing over their Launchpad pasword.
Right now, the web service provides basic access to Launchpad’s people and bugs. We’re working now to expose more of Launchpad’s data–projects, milestones, and so on–and to improve the usability of the Python client. Once we’ve stabilized the framework, we’ll open up the web service API to everyone. In the meantime, you can try it out by joining the Launchpad Beta Testers team. Once you’re on the team, you can get started by visiting the help homepage.
Our Python library, launchpadlib, works as a “web service browser”. You can use it to navigate the web service from a Python script, the way you surf the Launchpad website from your web browser. You don’t need any special knowledge of web services to use launchpadlib; you can write natural-looking code like this:
>>> me = launchpad.people['my-username']
>>> me.display_name = 'My new display name'
>>> me.lp_save()
We’ll be improving launchpadlib and the web service simultaneously; this is just the beginning.
Survey about Launchpad’s upstream bug workflow
Published by Matthew Revell in General
As we’ve spoken about before on this blog, one of the cool things about Launchpad’s bug tracker is that it can link bugs together, regardless of whether they’re tracked in Launchpad or an external bug tracker.
This is great for Ubuntu, where people report issues against an Ubuntu package of an upstream project. Jorge Castro works on Ubuntu’s community team and wants to know how we could improve this for upstream projects.
So, if you’re from an upstream project and have an opinion on how we can improve the workflow between Launchpad and your external bug tracker, take Jorge’s survey.
Launchpad 2.0: new beta API, new UI and more!
Published by Matthew Revell July 29, 2008 in Releases
I’m thrilled to announce the release of Launchpad 2.0!
This brings together new features from the past nine months of Launchpad’s development and introduces two exciting beta features.
And, of course, if you’ve visited Launchpad recently you’ll have seen our new, simpler, layout and navigation.
Let’s take a look at the key new features in this release.
Restful web services API and Python library
One of our main goals for Launchpad 2.0 has been to make it easier to manipulate data in Launchpad.
With this release, we’re introducing a beta test of two things that will enable you to develop external applications that can authenticate,
query and modify data in Launchpad’s database:
- a restful web services API
- and a Python library to access the new API.
Initially, the API will provide access to file and search for bugs, as well as the people and teams systems.
We’ll announce full details of the API and Python library later this week; keep an eye on this blog!
In the mean time, apply to join the Launchpad Beta Testers team if you’d like to take part in the beta.
Closer integration with Bugzilla and Trac

Often, bugs in free software affect more than one project. Launchpad lets projects share the same bug report and comment history so they can worth together on a fix.
Up until now, that’s only been available where each project uses Launchpad as their bug tracker. With Launchpad 2.0, we’re introducing a beta test of two new GPL plugins — one for Bugzilla, one for Trac — that enable projects to share a comment history between the bug as it’s tracked in Launchpad and in external trackers.
If you would like to help beta test the new plugins, let us know.
Simpler page layout and navigation
One of the most obvious changes in Launchpad 2.0 is the web interface’s new design. Our aim has been to simplify the layout and navigation. There’s more in our blog post.
New tour

Want to show someone what Launchpad’s all about? Send them to our new tour!
Other new features that make up Launchpad 2.0
Since our 1.0 launch in April 2007, we’ve introduced many new features that make up Launchpad 2.0, including:
- Code review: public discussion and voting on proposed code merges.
- Mailing lists for teams.
- Personal package archives: publish Ubuntu packages in your own apt repository.
- Atom feeds for bugs, branches and project announcements.
- Plus: binary file downloads, improved universal search, translation string search and support for more external bug trackers, amongst other improvements.
As ever, we’d love to hear what you think of our new release. If you come across a problem, please file a bug. Otherwise, send us an email, in particular if there’s something you really want to see in a future Launchpad release.
Simpler Launchpad web interface
Published by Matthew Revell in Cool new stuff
With the release of Launchpad 2.0, we’ve introduced a new, simpler, design and navigation.
Over the past couple of weeks, you may already have seen that we’ve made some changes to Launchpad’s web interface. For a start, there’s our fabulous new logo (designed by Eugene Tretyak) and new silver header bar.
The changes that we think are likely to have most effect on how you use Launchpad are:
- The beginning of the end of the Actions menu:we’ve started the process of removing the catch-all Actions menu. Now, many of the links you use to change information on a page are closer to the information itself.
- Page-wide application tabs: to emphasise the importance of the effect that switching between applications has on the information you’re viewing on the page, we’ve made the application tabs much more prominent.
- New sub-tabs: take a look at your person profile and you’ll see that below the main application tabs are a second row of tabs that switch between pages of different information about your activity in Launchpad. These new sub-tabs appear on many pages and should make it easier to drill down to the info you want.
If you come across a bug in the new web interface, please report it. If you have any other feedback, we’d love to hear from you.
Bugzilla and Trac plugins
Published by Matthew Revell July 28, 2008 in Cool new stuff
You may have spotted, on the Launchpad front page, a new summary of what Launchpad’s all about:
“Launchpad is hosting service for open source projects that’s big on collaboration.”
One of the earliest manifestations of our approach to collaboration was Launchpad’s ability to track the status of the same bug as it affects different projects. For example, a bug discovered in the Silva CMS may actually be a bug in the Zope 3 web application framework.
Because both Silva and Zope 3 use Launchpad to track their bugs, Launchpad treats that shared bug report as a single entity with the same bug number and a shared comment history. The bug report turns into a cross-project effort to find a fix for everyone, while both Silva and Zope 3 keep track of how the bug affects their projects through separate statuses, assignees and so on.
Now, if that same bug also affects a project that tracks its bugs outside Launchpad – say, in Sourceforge or the Debian BTS – then it’s harder to share a comment history. Instead, Launchpad links to the bug report in the external tracker and imports it status. If the bug gets fixed by the other project, everyone working on it in Launchpad can see straight away.
However, we’re committed to the idea that a shared comment history in effect creates an ad-hoc, cross-project, team to fix the bug. A project’s choice of bug tracker – in so far as is possible – shouldn’t prevent them from taking part in that conversation.
That’s why we’re about to launch a beta test of two new GPL plugins that make it easier for Launchpad to interact with Bugzilla and with Trac. Once they’re released, the plugins will enable Bugzilla and Trac instances to share bug comment histories with Launchpad.
We’re on the look-out for people to help us test the plugins. If you’re interested, drop us a mail.
Help test Launchpad’s new API!
Published by Matthew Revell in Cool new stuff
Launchpad is big. Really big. Almost two and a half million people have Launchpad user accounts and close to seven and a half thousand projects are registered in the directory.
Then there are the couple of hundred thousand bug reports, thousands of code branches, millions of translated strings, blueprints, user support questions, personal package archives, mailing lists and more.
One of the goals of Launchpad 2.0 is to make it easier to access that data and, with this release, we’re introducing the beta test of our new restful web API and Python library!
During the test, the API and library will provide access to the bug tracker, as well as people and teams. Within time, our aim is to make the API as comprehensive as the web interface. In the Launchpad team, we’re really excited by the idea that this gives you the tools to do things with Launchpad we haven’t even dreamt of.
We’ll be making the full announcement of the API beta test on this blog later this week. In the mean time, sign up to the Launchpad Beta Testers team!
Launchpad offline 22.00 – 23.00 UTC 23rd July 2008
Published by Matthew Revell July 23, 2008 in Notifications
We’re rolling out an update to Launchpad at 22.00 UTC today (23rd July). Launchpad will be offline for a few minutes, however we’re allowing a one hour window.
This down-time is part of our roll-out of Launchpad 2.0 release.
Offline at: 22.00 UTC 23rd July
Expected back before: 23.00 UTC 23rd July


