Skip to main content

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

Adafruit-PlatformDetect-0.0.4.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

Adafruit_PlatformDetect-0.0.4-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file Adafruit-PlatformDetect-0.0.4.tar.gz.

File metadata

  • Download URL: Adafruit-PlatformDetect-0.0.4.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.12.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.13

File hashes

Hashes for Adafruit-PlatformDetect-0.0.4.tar.gz
Algorithm Hash digest
SHA256 302491656b8767ae1ca74beee28d5e7a4936a6a14cea65043f2deecf244629c9
MD5 bdc1d99e95925f522b144b8a461ee567
BLAKE2b-256 9f65529b91d205074def82114e3e46ac97304dee9ea2b2851c2bdd29aba7bcbf

See more details on using hashes here.

File details

Details for the file Adafruit_PlatformDetect-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: Adafruit_PlatformDetect-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.12.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.13

File hashes

Hashes for Adafruit_PlatformDetect-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 817a4f9c36d3e0fa1b4b6cdc75779ab2c9f9822dee1acfe682462fa0339596ab
MD5 3f3c4e7ed5082d3bae8f3f054d565b0a
BLAKE2b-256 c0b0764b91c1a5ef753f3897eb869532afb225d773207b0c2de6cd599e004eb3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page