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

Uploaded Source

Built Distribution

Adafruit_PlatformDetect-0.0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Adafruit-PlatformDetect-0.0.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.3

File hashes

Hashes for Adafruit-PlatformDetect-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e4f609d8cb41ac06c7ac225910c4332b9e51067fb92151d6b9add5dd6c5247a5
MD5 8279162b706527283795f6b5a60a0a46
BLAKE2b-256 81b15fa0865e8d8ae78ca646f1548ac33e995f031ffd3e5a34a54251c46b0a04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Adafruit_PlatformDetect-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.3

File hashes

Hashes for Adafruit_PlatformDetect-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 24432d21c82a4b1da9c9d48b2212fe254c2b8925fbf5001a7e9bb10c7565878b
MD5 617a895d17b3ac94c743ef49ba26219f
BLAKE2b-256 f7d9a1e533c2b3221090f2c9d190c444b1af40bda9d0575354253c0ca063e7bc

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