Skip to main content

Get Raspberry Pi hardware info

Project description

https://img.shields.io/pypi/v/PiHardwareInfo.svg https://img.shields.io/pypi/pyversions/PiHardwareInfo.svg https://img.shields.io/pypi/dm/PiHardwareInfo.svg

Get Raspberry Pi hardware info from /proc/cpuinfo

Try

run

curl -s https://raw.githubusercontent.com/rexzhang/pi-hardware-info/master/pi_hardware_info.py | python3

result

<PiHardwareInfo:0x000005, MODEL_B, UNKNOWN, 256, 2.0, QISDA, UNKNOWN>
<PiHardwareInfo:0xa020d3, MODEL_3B_PLUS, BCM2837, 1024, 1.3, SONY_UK, 00000000d855943b>

Install

pip install PiHardwareInfo

Usage

from pi_hardware_info import ModelType, get_info

info = get_info()
if info.model_type == ModelType.MODEL_3B_PLUS:
    print('5G Wifi ready')

elif info.model_type == ModelType.MODEL_3B:
    print('only 2.4G Wifi')

Alternative

Ref

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PiHardwareInfo-0.3.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

PiHardwareInfo-0.3.3-py2.py3-none-any.whl (3.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file PiHardwareInfo-0.3.3.tar.gz.

File metadata

  • Download URL: PiHardwareInfo-0.3.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for PiHardwareInfo-0.3.3.tar.gz
Algorithm Hash digest
SHA256 2b26d6f2250d9997fe83a9b7d5d9122388ffd572836026cdf79e7b273f44b80e
MD5 52c6a4b457f17a707213d8c0711fcbd8
BLAKE2b-256 8410b863f60272aa958c35f74db3dc43d3f9380e4a8ef735ae3ee84ff785b000

See more details on using hashes here.

Provenance

File details

Details for the file PiHardwareInfo-0.3.3-py2.py3-none-any.whl.

File metadata

  • Download URL: PiHardwareInfo-0.3.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for PiHardwareInfo-0.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0063b5a33ac063557732a64fcc4fe8baf82ebc3bb88d356b7594f75193487328
MD5 83fdf4f9dd948dabc471c084538addfb
BLAKE2b-256 f06a18a3bc26ce4ededfa06c61ad437060ad30b1c5c85f836f208195f6b5fba5

See more details on using hashes here.

Provenance

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