Raspberry Pi revision utility
Project description
pirev
A tiny, zero-dependency utility providing hardware revision information for Raspberry Pi devices. All information is parsed from the device's revision code located in /proc/cpuinfo.
Installation
pip install pirev
Usage
from pirev import getInfo
info = getInfo()
print('Raspberry Pi {type}'.format(type=info['revision']['type']))
Error handling
Running the utility on a device which is not a Raspberry Pi will result in an error being raised.
try:
info = getInfo()
print('Raspberry Pi {type}'.format(type=info['revision']['type']))
except ReferenceError:
print('Not a Raspberry Pi device!')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pirev-1.2.1.tar.gz.
File metadata
- Download URL: pirev-1.2.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8258467df99f8351e00c294b1cc608640825ccf13e0f18d9df497f32525564f0
|
|
| MD5 |
68c7e39384daa6abe30de6c454479737
|
|
| BLAKE2b-256 |
84b2eca2c411859dc262cf85eddca0931294b5a75d0e0dc304daaf3fdefb0663
|
File details
Details for the file pirev-1.2.1-py3-none-any.whl.
File metadata
- Download URL: pirev-1.2.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
badf02469abe46e818e9a34e77b1a9e05b9b129ec245c7471af22176a889e7fa
|
|
| MD5 |
3b4a9d07e07082ed5822e8c849d50d6d
|
|
| BLAKE2b-256 |
c4bf72a731655ef180482f542e877e5c5b8e3ec8a54390f70d31963dd0826f1a
|