How to search for and list available ppas путь the python launchpad API?

I can't фигурировал out how to использовал the python launchpadlib to search for ppas.

In other words, I am looking for в python API интерфейс for the official launchpad (ubuntu) ppa search. В Веб form for the serach is offered here.

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

Could someone give я в hint to find the corresponding APIs?

9
задан 27 July 2015 в 02:11

1 ответ

Нахождение всего PPAs

нет никакого API, чтобы сделать это и вероятно, не будет, поскольку Вы, как предполагается, не просите огромные наборы объектов через API Python.

Нахождение всего PPAs с определенным именем

AFAIK это не возможно. Сообщите о запросе новых функций относительно https://bugs.launchpad.net/launchpadlib.

Нахождение всего PPAs, принадлежавшего пользователю с именем

, Это возможно, используйте launchpad.people['username'].ppas, полный пример:

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']

Вы могли бы думать, что можно объединить это с ищущими людьми, но это не будет работать. Существует предел на то, сколько людей можно добраться (я думаю, что это 50 или что-то как этот).

весь API документируется здесь: https://launchpad.net/+apidoc/1.0.html

5
ответ дан 23 November 2019 в 05:10

Другие вопросы по тегам:

Похожие вопросы: