9

I can't figure out how to use the python launchpadlib to search for ppas.

In other words, I am looking for a python API interface for the official launchpad (ubuntu) ppa search. A web form for the serach is offered here.

I would like to not only search for certain key words but also obtain a complete list of all ppas available on launchpad.

Could someone give me a hint to find the corresponding APIs?

2
  • @Nathan Osman: Would you say this answers my question? – gogo_gorilla Oct 5 '15 at 6:55
  • yup, I'd say it does. – Nathan Osman Oct 5 '15 at 6:57
5
+100

Finding all PPAs

There is no API to do this and there probably won't be as you are not supposed to ask for huge collections of objects via the Python APIs.

Finding all PPAs with a certain name

AFAIK it is not possible. Report a feature request on https://bugs.launchpad.net/launchpadlib.

Finding all PPAs owned by a user with a given name

This is possible, use launchpad.people['username'].ppas, full example:

python
>>> from launchpadlib.launchpad import Launchpad
>>> launchpad = Launchpad.login_anonymously('just testing', 'production', '/home/user/tmp')
>>> [ ppa.name for ppa in launchpad.people['mvo'].ppas ]
[u'apt-clone-lucid', u'apt-fix-633967', u'apt-ftparchive-arch', u'apt-ftparchive-lucid', u'apt-ftparchive-srccache-backport', u'apt-gcc5', u'apt-https-fix', u'apt-lucid-chris', u'apt-precise', u'apt-src-ftparchive', u'apt-vivid', u'auto-upgrade-tester', u'debsigs-trusty', u'eglibc-trusty', u'freeglut-multiarch', u'gir-multiarch', u'hwe-eol', u'linux-firmware-nonfree', u'lp1347721', u'lp1371058', u'lucid-precise-upgrades', u'lucid-precise-upgrades2', u'oem', u'openoffice', u'ppa', u'public-test', u'python-apt', u'release-upgrader-apt', u'samba4', u'sdk', u'smem', u'synaptic', u'test-dependencies', u'ubuntu-sdk-libs', u'unattended-upgrades', u'upgrade-tests', u'wine', u'wsmancli']

You might think that you can combine this with searching people, but it will not work. There is a limit on how many people you can get (I think it is 50 or something like that).

The entire API is documented here: https://launchpad.net/+apidoc/1.0.html

1
  • I hope someone replaces ppasearch CLI – Jonathan May 29 '18 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.