Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Get Raspberry Pi hardware info

Project description

Get Raspberry Pi hardware info from /proc/cpuinfo



curl -s | python3


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


pip install PiHardwareInfo


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

Project details

Download files

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

Files for PiHardwareInfo, version 0.3.3
Filename, size File type Python version Upload date Hashes
Filename, size PiHardwareInfo-0.3.3-py2.py3-none-any.whl (3.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size PiHardwareInfo-0.3.3.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page