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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 302491656b8767ae1ca74beee28d5e7a4936a6a14cea65043f2deecf244629c9 |
|
MD5 | bdc1d99e95925f522b144b8a461ee567 |
|
BLAKE2b-256 | 9f65529b91d205074def82114e3e46ac97304dee9ea2b2851c2bdd29aba7bcbf |
Close
Hashes for Adafruit_PlatformDetect-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 817a4f9c36d3e0fa1b4b6cdc75779ab2c9f9822dee1acfe682462fa0339596ab |
|
MD5 | 3f3c4e7ed5082d3bae8f3f054d565b0a |
|
BLAKE2b-256 | c0b0764b91c1a5ef753f3897eb869532afb225d773207b0c2de6cd599e004eb3 |