--- id: adafruit-platformdetect version: "3.89.1" license: MIT license_treatment: permissive maintenance: active --- # Adafruit-PlatformDetect — Platform detection for use by libraries like Adafruit-Blinka. License: permissive · Maintenance: active · Downloads: 158.7K/mo ## What it is and what it does Adafruit-PlatformDetect is a library that identifies what single-board computer or platform your code is running on by examining system files and Python's built-in platform info. It separates detection into two layers: chip identification (the processor itself) and board identification (the specific device model), since board detection often depends on knowing the chip first. The library gathers platform information from Linux system files like /proc/cpuinfo and /proc/device-tree/compatible, as well as board-specific sources like Beaglebone EEPROM IDs and distribution files. It was originally written to support Adafruit_Blinka, a compatibility layer that lets CircuitPython code run on Linux single-board computers, but the detection logic is general enough to be useful in any project that needs to know what hardware it's running on. The library has no runtime dependencies and installs cleanly, making it lightweight for embedded and IoT use cases where you need to adapt behavior based on the detected platform. Use it for: - Detect Raspberry Pi model in a GPIO control library to apply model-specific pin mappings or timing adjustments. - Identify Beaglebone Black in a hardware abstraction layer to load the correct device drivers. - Adapt CircuitPython code to run on different single-board computers by detecting the platform at startup. - Build cross-platform embedded applications that behave differently on Raspberry Pi, Orange Pi, or generic Linux PCs. - Validate that a deployment is running on the expected hardware before initializing peripherals. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Detects the chip and board type of single-board computers and other platforms by reading system files and Python's sys.platform, primarily for use with Adafruit libraries. Yes. The package is actively maintained, has no dependencies, installs with low friction, carries a permissive MIT license, and solves a real problem for anyone writing code that needs to adapt to different single-board computers. It has been stable since 2018 and is in production use. Install it if your project needs to detect or adapt to the underlying hardware platform. ## Install pip install adafruit-platformdetect uv add adafruit-platformdetect poetry add adafruit-platformdetect ## Installing Adafruit-PlatformDetect Before you install: Low friction installation with no runtime dependencies. Active maintenance as of 2026-06-24 with a recent release 51 days ago. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects. Quickstart: pip install Adafruit-PlatformDetect from adafruit_platformdetect import Detector detector = Detector() print(detector.chip.id) print(detector.board.id) Requires Python 3.7 or higher; platform detection relies on Linux system files (/proc/cpuinfo, /proc/device-tree/compatible, etc.) and will have limited functionality on non-Linux systems. Verify before relying: - Whether the package successfully detects all advertised board models (Raspberry Pi, Beaglebone, Orange Pi, etc.) on current hardware. - Performance impact of reading multiple system files during detection on resource-constrained single-board computers. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 158.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags single-board computer detection, raspberry pi board detection, platform chip identification, hardware platform detection, beaglebone board detection, arm board detection, device platform discovery, hardware-detection, single-board-computer, embedded-systems [View on SkillFed](https://skillfed.io/packages/adafruit-platformdetect) · [View on PyPI](https://pypi.org/project/adafruit-platformdetect/)