Get Raspberry Pi hardware info
Project description
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.2.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for PiHardwareInfo-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 768cbdb5fe4cd6130ccab5b54113d3ce768aa28eaa819fc10af3126f5e5aa723 |
|
MD5 | ba378327605a539f233f1390e3cf680b |
|
BLAKE2b-256 | 0e5253e810fd79c15ee906e94a1c99d22085bc0631ab7b0608552e43145b57d4 |