piview.Host

Module Contents

Classes

Host

class piview.Host.Host[source]
static boot_time()[source]

Determines the time the device was started

Return type

datetime

Returns

How long ago the Pi was booted

static model()[source]

Provide Pi Model Details

Extracts the details from the device tree model file

Return type

string

Returns

The model name and other identifying details

static name()[source]

Provides the host name to the user

Return type

string

Returns

The host name of the Pi

static python()[source]

Get current Python version

Return type

string

Returns

A string containing the version of python that is being used

static revision()[source]

Provide board revision details

The details are extracted from the cpu info file

Return type

string

Returns

The revision number of the Pi motherboard

static serial()[source]

Provide the Serial Number of the Pi CPU

The details are extracted from the cpu info file

Return type

string

Returns

The Pi’s serial number

static uptime()[source]

Determines the amount of time the device has been running for in seconds

Return type

float

Returns

The time that the Pi has been ‘up’ for