Platform detection for use by libraries like Adafruit-Blinka.
Project description
Introduction
This library provides best-guess platform detection for a range of single-board computers and (potentially) other platforms. It’s intended for use in Adafruit_Blinka, but may be useful in other contexts.
The API is currently unstable and may change drastically in future releases.
Installation
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install Adafruit-PlatformDetect
To install system-wide (this may be required in some cases):
sudo pip3 install Adafruit-PlatformDetect
To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install Adafruit-PlatformDetect
Usage
from adafruit_platformdetect import Detector
detector = Detector()
print("Chip id: ", detector.chip.id)
print("Board id: ", detector.board.id)
# Check for specific board models:
print("Pi 3B+? ", detector.board.RASPBERRY_PI_3B_PLUS)
print("BBB? ", detector.board.BEAGLEBONE_BLACK)
print("Orange Pi PC? ", detector.board.ORANGE_PI_PC)
print("generic Linux PC? ", detector.board.GENERIC_LINUX_PC)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for Adafruit-PlatformDetect-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4f609d8cb41ac06c7ac225910c4332b9e51067fb92151d6b9add5dd6c5247a5 |
|
MD5 | 8279162b706527283795f6b5a60a0a46 |
|
BLAKE2b-256 | 81b15fa0865e8d8ae78ca646f1548ac33e995f031ffd3e5a34a54251c46b0a04 |
Close
Hashes for Adafruit_PlatformDetect-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24432d21c82a4b1da9c9d48b2212fe254c2b8925fbf5001a7e9bb10c7565878b |
|
MD5 | 617a895d17b3ac94c743ef49ba26219f |
|
BLAKE2b-256 | f7d9a1e533c2b3221090f2c9d190c444b1af40bda9d0575354253c0ca063e7bc |