"""Extract application permissions.""" from typing import Dict from google_play_scraper.utils.http_utils import get from google_play_scraper.constants.google_play import PERMISSIONS_URL_FORMAT def permissions(app_id: str, lang: str = "en", country: str = "us") -> Dict: """Get app permissions.""" url = PERMISSIONS_URL_FORMAT.format(app_id=app_id, lang=lang, country=country) response = get(url) return { "permissions": response.get("permissions", []), "permission_types": response.get("permissionTypes", {}) }