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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 265c0c8b46eedb85c72e5b2961cbe7d7a3bb15f0db8c9f62172672a2b0d2b979 |
|
MD5 | 5ea7b61271df5441bd7451ce56f99fc7 |
|
BLAKE2b-256 | 75f22fffad919493a48c83d51bbc34a76f5dd922713d2761ca6ad9d1da864597 |
Close
Hashes for Adafruit_PlatformDetect-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1ac77c922f441b171f701fc515727ce5f1636a9af5d19ff80f70f06b6a6020 |
|
MD5 | 854855c266b1798642353168cc68b648 |
|
BLAKE2b-256 | 1a5a543531669051e585dc5f2495ade7cce2f6c5e43df0e3b4a99e62a1f46ab7 |