Last active
July 21, 2022 17:20
-
-
Save jugmac00/a77af7e4554de3042440fda8cfc10ce9 to your computer and use it in GitHub Desktop.
get some infos about the PPas of a team
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
- create and activate a virtual env | |
- `pip install launchpadlib` | |
- run `python main.py https://launchpad.net/~deadsnakes` | |
API: | |
https://launchpad.net/+apidoc/devel.html | |
Getting started: | |
https://help.launchpad.net/API/launchpadlib | |
""" | |
from argparse import ArgumentParser | |
from urllib.parse import urlparse | |
from launchpadlib.launchpad import Launchpad | |
parser = ArgumentParser() | |
parser.add_argument("team", help="Full URL to a team") | |
args = parser.parse_args() | |
launchpad = Launchpad.login_anonymously( | |
"testing", "production", version="devel" | |
) | |
if args.team: | |
team = launchpad.load(urlparse(args.team).path) | |
ppas = team.ppas | |
for ppa in ppas: | |
for ps in ppa.getPublishedBinaries(): | |
print(ps.display_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment