Skip to main content

Python bindings for libsensors3

Project description

sensors.py

python bindings using ctypes for libsensors3 of the lm-sensors project. The code was written against libsensors 3.3.4.

For documentation of the low level API see sensors.h. For an example of the high level API see example.py.

For a GUI application that displays the sensor readings and is based on this library, take a look at sensors-unity.

Features

  • Full access to low level libsensors3 API
  • High level iterator API
  • unicode handling
  • Python2 and Python3 compatible

Licensing

LGPLv2 (same as libsensors3)

Usage Notes

As Python does not support call by reference for primitive types some of the libsensors API had to be adapted:

# nr is changed by refrence in the C API
chip_name, nr = sensors.get_detected_chips(None, nr)

# returns the value. throws on error
val = sensors.get_value(chip, subfeature_nr)

Missing Features (pull requests are welcome):

  • sensors_subfeature_type enum
  • sensors_get_subfeature

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

sensors.py-2.0.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distribution

sensors.py-2.0-py2.py3-none-any.whl (13.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page