Skip to main content

Raspberry Pi revision utility

Project description


pypi version license

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.


pip install pirev


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.

  info = getInfo()
  print('Raspberry Pi {type}'.format(type=info['revision']['type']))
except ReferenceError:
  print('Not a Raspberry Pi device!')

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 pirev, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size pirev-1.2.1-py3-none-any.whl (6.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pirev-1.2.1.tar.gz (4.2 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 Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page