PySensors


NamePySensors JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttp://pypi.python.org/pypi/PySensors/
SummaryPython bindings to libsensors (via ctypes)
upload_time2019-09-29 11:59:23
maintainer
docs_urlNone
authorMarc 'BlackJack' Rintsch
requires_python>=3.6
licenseLGPL v2.1
keywords sensors hardware monitoring
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =========
PySensors
=========

:author: Marc 'BlackJack' Rintsch
:date: 2014-08-17

Python bindings for ``libsensors.so`` from the `lm-sensors`_ project via
`ctypes`. Supports API version 4, i.e. `libsensors` version 3.x.

Motivation
==========

Motivation for this package are shortcomings of scraping the output of
the ``sensors`` command by different shell scripts.  Some had problems when
labels changed, others could not cope with too many matches of their
overly broad regular expressions, and so on.  Those scripts and thus
this package are used at `RebeIT`_ for monitoring servers.  The needs of
that task are the driving force behind this implementation.

Requirements
============

* Python ≥3.6
* ``libsensors.so`` from `lm-sensors`_ version 3.x (API 4)

The package is pure Python, so any implementation with the `ctypes` module
should work.

Installation
============

The usual ``python setup.py install`` from within the source distribution.

Links
=====

================= =================================================
PyPi Entry        http://pypi.python.org/pypi/PySensors/
Source repository https://bitbucket.org/blackjack/pysensors/
Bugtracker        https://bitbucket.org/blackjack/pysensors/issues/
================= =================================================

Example
=======

The following example prints all detected sensor chips, their adapter, and the features with their ”main” value for each chip::

  import sensors
  
  sensors.init()
  try:
      for chip in sensors.iter_detected_chips():
          print '%s at %s' % (chip, chip.adapter_name)
          for feature in chip:
              print '  %s: %.2f' % (feature.label, feature.get_value())
  finally:
      sensors.cleanup()

Example output of the code above::

  k8temp-pci-00c3 at PCI adapter
    Core0 Temp: 16.00
    Core0 Temp: 11.00
    Core1 Temp: 28.00
    Core1 Temp: 19.00
  w83627ehf-isa-0290 at ISA adapter
    Vcore: 1.10
    in1: 1.10
    AVCC: 3.30
    VCC: 3.31
    in4: 1.68
    in5: 1.68
    in6: 1.86
    3VSB: 3.30
    Vbat: 3.06
    in9: 1.55
    Case Fan: 1231.00
    CPU Fan: 2410.00
    Aux Fan: 0.00
    fan5: 0.00
    Sys Temp: 39.00
    CPU Temp: 31.50
    AUX Temp: 30.50
    cpu0_vid: 0.00

.. _CPython: http://www.python.org/
.. _lm-sensors: http://www.lm-sensors.org/
.. _PyPy: http://pypy.org/
.. _RebeIT: http://www.rebeit.de/
            

Raw data

            {
    "_id": null,
    "home_page": "http://pypi.python.org/pypi/PySensors/",
    "name": "PySensors",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "sensors,hardware,monitoring",
    "author": "Marc 'BlackJack' Rintsch",
    "author_email": "marc@rintsch.de",
    "download_url": "https://files.pythonhosted.org/packages/76/31/d3383a192f31ce1d79f27ec3d047cca23dd82a1bf0939e774386aba37cf5/PySensors-0.0.4.tar.gz",
    "platform": "",
    "description": "=========\nPySensors\n=========\n\n:author: Marc 'BlackJack' Rintsch\n:date: 2014-08-17\n\nPython bindings for ``libsensors.so`` from the `lm-sensors`_ project via\n`ctypes`. Supports API version 4, i.e. `libsensors` version 3.x.\n\nMotivation\n==========\n\nMotivation for this package are shortcomings of scraping the output of\nthe ``sensors`` command by different shell scripts.  Some had problems when\nlabels changed, others could not cope with too many matches of their\noverly broad regular expressions, and so on.  Those scripts and thus\nthis package are used at `RebeIT`_ for monitoring servers.  The needs of\nthat task are the driving force behind this implementation.\n\nRequirements\n============\n\n* Python \u22653.6\n* ``libsensors.so`` from `lm-sensors`_ version 3.x (API 4)\n\nThe package is pure Python, so any implementation with the `ctypes` module\nshould work.\n\nInstallation\n============\n\nThe usual ``python setup.py install`` from within the source distribution.\n\nLinks\n=====\n\n================= =================================================\nPyPi Entry        http://pypi.python.org/pypi/PySensors/\nSource repository https://bitbucket.org/blackjack/pysensors/\nBugtracker        https://bitbucket.org/blackjack/pysensors/issues/\n================= =================================================\n\nExample\n=======\n\nThe following example prints all detected sensor chips, their adapter, and the features with their \u201dmain\u201d value for each chip::\n\n  import sensors\n  \n  sensors.init()\n  try:\n      for chip in sensors.iter_detected_chips():\n          print '%s at %s' % (chip, chip.adapter_name)\n          for feature in chip:\n              print '  %s: %.2f' % (feature.label, feature.get_value())\n  finally:\n      sensors.cleanup()\n\nExample output of the code above::\n\n  k8temp-pci-00c3 at PCI adapter\n    Core0 Temp: 16.00\n    Core0 Temp: 11.00\n    Core1 Temp: 28.00\n    Core1 Temp: 19.00\n  w83627ehf-isa-0290 at ISA adapter\n    Vcore: 1.10\n    in1: 1.10\n    AVCC: 3.30\n    VCC: 3.31\n    in4: 1.68\n    in5: 1.68\n    in6: 1.86\n    3VSB: 3.30\n    Vbat: 3.06\n    in9: 1.55\n    Case Fan: 1231.00\n    CPU Fan: 2410.00\n    Aux Fan: 0.00\n    fan5: 0.00\n    Sys Temp: 39.00\n    CPU Temp: 31.50\n    AUX Temp: 30.50\n    cpu0_vid: 0.00\n\n.. _CPython: http://www.python.org/\n.. _lm-sensors: http://www.lm-sensors.org/\n.. _PyPy: http://pypy.org/\n.. _RebeIT: http://www.rebeit.de/",
    "bugtrack_url": null,
    "license": "LGPL v2.1",
    "summary": "Python bindings to libsensors (via ctypes)",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "http://pypi.python.org/pypi/PySensors/"
    },
    "split_keywords": [
        "sensors",
        "hardware",
        "monitoring"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7631d3383a192f31ce1d79f27ec3d047cca23dd82a1bf0939e774386aba37cf5",
                "md5": "af5ca440297b45bd440d32a7c8341c0f",
                "sha256": "beb0def410d29ee46fe196a7811124772abf84cbe3a0d8b01d80b81fba31dae5"
            },
            "downloads": -1,
            "filename": "PySensors-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "af5ca440297b45bd440d32a7c8341c0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 10599,
            "upload_time": "2019-09-29T11:59:23",
            "upload_time_iso_8601": "2019-09-29T11:59:23.134779Z",
            "url": "https://files.pythonhosted.org/packages/76/31/d3383a192f31ce1d79f27ec3d047cca23dd82a1bf0939e774386aba37cf5/PySensors-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2019-09-29 11:59:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pysensors"
}
        
Elapsed time: 0.08234s