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.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

Adafruit_PlatformDetect-0.0.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Adafruit-PlatformDetect-0.0.3.tar.gz
  • Upload date:
  • Size: 8.5 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.3.tar.gz
Algorithm Hash digest
SHA256 265c0c8b46eedb85c72e5b2961cbe7d7a3bb15f0db8c9f62172672a2b0d2b979
MD5 5ea7b61271df5441bd7451ce56f99fc7
BLAKE2b-256 75f22fffad919493a48c83d51bbc34a76f5dd922713d2761ca6ad9d1da864597

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Adafruit_PlatformDetect-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc1ac77c922f441b171f701fc515727ce5f1636a9af5d19ff80f70f06b6a6020
MD5 854855c266b1798642353168cc68b648
BLAKE2b-256 1a5a543531669051e585dc5f2495ade7cce2f6c5e43df0e3b4a99e62a1f46ab7

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