Get Raspberry Pi hardware info
Project description
https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
Home-page: https://github.com/rexzhang/pi-hardware-info
Author: Rex Zhang
Author-email: rex.zhang@gmail.com
License: MIT
Description: # PiHardwareInfo
Get Raspberry Pi hardware info from /proc/cpuinfo
# Try
```bash
curl -s https://raw.githubusercontent.com/rexzhang/pi-hardware-info/master/pi_hardware_info.py | python3
```
```text
<PiHardwareInfo:0xa020d3, MODEL_3B_PLUS, BCM2837, 1024, 1.3, Sony_UK, 00000000d855943b>
```
# Install
```bash
pip install PiHardwareInfo
```
# Usage
```python
from pi_hardware_info import ModelType, get_info
info = get_info()
if info.model_type == ModelType.MODEL_3B_PLUS:
print('5G Wifi ready')
else:
print('only 2.4G Wifi')
```
# Other choice
* https://github.com/tompreston/raspi-version (work)
* https://pypi.org/project/pirev
* https://pypi.org/project/RPi.version
# Ref
* https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
* https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/
* https://www.raspberrypi-spy.co.uk/2012/09/getting-your-raspberry-pi-serial-number-using-python/
Keywords: raspberrypi
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Python: >=3.5
Home-page: https://github.com/rexzhang/pi-hardware-info
Author: Rex Zhang
Author-email: rex.zhang@gmail.com
License: MIT
Description: # PiHardwareInfo
Get Raspberry Pi hardware info from /proc/cpuinfo
# Try
```bash
curl -s https://raw.githubusercontent.com/rexzhang/pi-hardware-info/master/pi_hardware_info.py | python3
```
```text
<PiHardwareInfo:0xa020d3, MODEL_3B_PLUS, BCM2837, 1024, 1.3, Sony_UK, 00000000d855943b>
```
# Install
```bash
pip install PiHardwareInfo
```
# Usage
```python
from pi_hardware_info import ModelType, get_info
info = get_info()
if info.model_type == ModelType.MODEL_3B_PLUS:
print('5G Wifi ready')
else:
print('only 2.4G Wifi')
```
# Other choice
* https://github.com/tompreston/raspi-version (work)
* https://pypi.org/project/pirev
* https://pypi.org/project/RPi.version
# Ref
* https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
* https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/
* https://www.raspberrypi-spy.co.uk/2012/09/getting-your-raspberry-pi-serial-number-using-python/
Keywords: raspberrypi
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Python: >=3.5
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.2.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for PiHardwareInfo-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cca7e078b7c58f32f70b03f5b20d9d8670b3b1b1b96191eedba7cd7736aab692 |
|
MD5 | 64dd6994292286cd7788d8bd7e6fc833 |
|
BLAKE2b-256 | 9571650c7d802b42e71823680d512ec44f16e2c15f17aec9d0bbe78e24af8bd6 |