How to search for and list available ppas via the python launchpad API?
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