#!/usr/bin/env python3 # 最新のバージョンを取得 # Usage: bin/version from urllib.request import urlopen import yaml base = "http://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf" url = f"{base}/latest-releases.yaml" res = urlopen(url) version = yaml.safe_load(res)[0]["version"] print(version)