{"id":31698849,"url":"https://github.com/bsthen/device-models","last_synced_at":"2026-05-04T13:35:00.583Z","repository":{"id":317947546,"uuid":"1069476922","full_name":"bsthen/device-models","owner":"bsthen","description":"Mapping of device codes to marketing names for Android and other smartphones, auto-updated from Google Play supported devices CSV.","archived":false,"fork":false,"pushed_at":"2025-10-04T04:10:32.000Z","size":306,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T04:21:20.730Z","etag":null,"topics":["android","api","device-codes","device-models","fastapi","google-play","json","python","smartphones"],"latest_commit_sha":null,"homepage":"https://raw.githubusercontent.com/bsthen/device-models/main/devices.json","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsthen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T02:29:34.000Z","updated_at":"2025-10-04T04:10:35.000Z","dependencies_parsed_at":"2025-10-04T04:21:21.811Z","dependency_job_id":"b2c56cfa-a371-4954-bf62-2cd5733e09de","html_url":"https://github.com/bsthen/device-models","commit_stats":null,"previous_names":["bsthen/device-models"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bsthen/device-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsthen%2Fdevice-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsthen%2Fdevice-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsthen%2Fdevice-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsthen%2Fdevice-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsthen","download_url":"https://codeload.github.com/bsthen/device-models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsthen%2Fdevice-models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000702,"owners_count":26082805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","api","device-codes","device-models","fastapi","google-play","json","python","smartphones"],"created_at":"2025-10-08T19:11:13.869Z","updated_at":"2025-10-08T19:11:39.908Z","avatar_url":"https://github.com/bsthen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Device Models\n\nThis repository provides a **mapping of device codes to marketing names** for Android and other smartphones. The data is sourced from the publicly available Google Play supported devices list and updated automatically via GitHub Actions.\n\n---\n\n## Features\n\n- **Device code → Marketing name mapping**  \n- Includes the **brand** of each device.  \n- Auto-updated **everyday** from Google’s CSV.  \n- JSON format for easy integration in apps, APIs, or scripts.  \n\n---\n\n## 🧩 CDN Providers\n\n| CDN Providers                             | CDN URLs                                                                | Notes                                                                                                |\n| ------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| **jsDelivr**                    | `https://cdn.jsdelivr.net/gh/bsthen/device-models/devices.json`            | ✅ Fast, reliable, cached globally via Cloudflare. Recommended for production.                        |\n| **Statically.io**               | `https://cdn.statically.io/gh/bsthen/device-models/main/devices.json`      | ✅ Fast, good for GitHub content, supports branches and tags.                                         |\n| **Rawcdn.githack**                 | `https://rawcdn.githack.com/bsthen/device-models/main/devices.json`           | ✅ Good for production usage; caches aggressively.  \n| **Raw.githack**                 | `https://raw.githack.com/bsthen/device-models/main/devices.json`           | ✅ Good for testing or demo usage; caches aggressively.                                               |\n| **gcore.jsdelivr.net (Mirror)** | `https://gcore.jsdelivr.net/gh/bsthen/device-models/devices.json`          | 🌍 Mirror of jsDelivr on Gcore network, used automatically by jsDelivr sometimes.                    |\n| **GitHub Raw URL**              | `https://raw.githubusercontent.com/bsthen/device-models/main/devices.json` | ⚠️ Not a CDN (no caching or speed optimization). Best for API scripts or updates.                    |\n\n## Example JSON Format\n\n```json\n{\n  \"SM-G965F\": {\n    \"brand\": \"Samsung\",\n    \"name\": \"Samsung Galaxy S9+\"\n  },\n  \"SM-G960F\": {\n    \"brand\": \"Samsung\",\n    \"name\": \"Samsung Galaxy S9\"\n  }\n}\n```\n\n# Usage\n\n## Python Example\n\n```bash\nimport requests\n\nDEVICES_URL = \"https://cdn.jsdelivr.net/gh/bsthen/device-models/devices.json\"\n\nresp = requests.get(DEVICES_URL)\ndevice_map = resp.json()\n\ndevice_code = \"SM-G965F\"\ndevice = device_map.get(device_code)\n\nif device:\n    print(f\"{device_code} → {device['brand']} {device['name']}\")\nelse:\n    print(\"Device not found\")\n```\n\n## FastAPI Example\n\n```bash\nfrom fastapi import FastAPI, HTTPException\nimport requests\n\napp = FastAPI()\nDEVICES_URL = \"https://cdn.jsdelivr.net/gh/bsthen/device-models/devices.json\"\ndevice_map = requests.get(DEVICES_URL).json()\n\n@app.get(\"/device\")\ndef get_device(code: str):\n    device = device_map.get(code.upper())\n    if device:\n        return {\"code\": code, \"brand\": device.get(\"brand\"), \"name\": device.get(\"name\")}\n    raise HTTPException(status_code=404, detail=\"Device not found\")\n\n```\n\n# GitHub Actions\n\nThis repository uses GitHub Actions to automatically fetch the latest supported devices CSV from Google, convert it to JSON, and commit updates everyday.\n\n# License\n\nThis repository is licensed under the [Apache License 2.0](https://github.com/bsthen/device-models?tab=Apache-2.0-1-ov-file).\n\n# Notes\n\n- The dataset is based on Google’s publicly available supported devices list:\n[https://storage.googleapis.com/play_public/supported_devices.html](https://storage.googleapis.com/play_public/supported_devices.html)\n\n- Device codes are usually manufacturer/model identifiers (e.g., SM-G965F for Samsung Galaxy S9+).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsthen%2Fdevice-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsthen%2Fdevice-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsthen%2Fdevice-models/lists"}