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/version 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')

History

0.4.0

  • Add, support Zero2W/400/CM4

  • Add, Overvoltage/OTP Program/OTP Read support

0.3.3

  • Support raspberry pi 4B

  • Rewrite some code

0.2.0

  • Add old style revision code support, support 1A/1B

0.1.0

  • First release

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

Uploaded Source

Built Distribution

PiHardwareInfo-0.4.0-py2.py3-none-any.whl (3.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: PiHardwareInfo-0.4.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for PiHardwareInfo-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b6f7934f503be11d6912fcbc568baf38030ae8dee377c4a641a6d20395abeafc
MD5 e3f98aac454cad8025a576f69854b1e4
BLAKE2b-256 6e81df8cb934ce0d662d9f07afcaff74bfe420aba8b8c28acf6d230afca65d7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for PiHardwareInfo-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2c320fdb9ebfb51cd6b76181bc9e10d400fcfd2dbd79768952e80c96b93b530e
MD5 921a6fc7d2fa2ad867b899678b118efb
BLAKE2b-256 caad8f5adea8ea16202d30d78b1a7b3ba1795e505da00b9f510b401d732c5bf2

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