Skip to main content

pyspectator is a cross-platform tool for retrieving full information about computer.

Project description

Summary

pyspectator is a Python cross-platform tool for monitoring resources of OS: CPU, memory, disk, network.

Requirements

  • OS: Linux, Windows, FreeBSD, Solaris

  • Python version: 3.X

  • Packages: psutil, netifaces, wmi (only on Windows), enum34 (only on python 3.0.0 - 3.4.0)

How to install

Run as root user:

pip install pyspectator

How to use

You can use pyspectator as module for your own project. Simple example of usage is presented in file “console.py”.

NOTE: on Windows pyspectator can require elevated privileges. It’s because Windows is fucking shit.

Class “Computer”

>>> from pyspectator.computer import Computer
>>> computer = Computer()
>>> computer.os
'Linux 3.14.4-1-MANJARO'
>>> computer.python_version
'CPython ver. 3.4.1'
>>> computer.uptime
'1:07:52'
>>> computer.processor.name
'Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz'

Class “Processor”

>>> from pyspectator.processor import Processor
>>> from time import sleep
>>> cpu = Processor(monitoring_latency=1)
>>> with cpu:  # initiate monitoring of CPU resources
...     for _ in range(8):
...        cpu.percent, cpu.temperature
...
(8.2, 32)
(6.6, 32)
(6.6, 31)
(4.1, 32)
(5.6, 32)
(12.3, 33)
(4.5, 32)
(4.5, 30)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyspectator-1.0.6.tar.gz (10.6 kB view details)

Uploaded Source

File details

Details for the file pyspectator-1.0.6.tar.gz.

File metadata

  • Download URL: pyspectator-1.0.6.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyspectator-1.0.6.tar.gz
Algorithm Hash digest
SHA256 adb10045bd0ddaafaf0b9db679986953b9e2cb742e8d9030d410879377b3eea3
MD5 21c6a7db2e184cd1e9e6ab771697925e
BLAKE2b-256 ab2948b7217d3d5abb2561e59802383b6cb9089547263af9dad3d5fd2d9ebf89

See more details on using hashes here.

Supported by

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