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)
For Windows OS Microsoft Visual C++ 10.0 or higher is required
How to install
Run as root user:
pip install pyspectator
Example of usage
There is simple project named pyspectator_tornado developed special for demonstration of pyspectator features.
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.
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 “Cpu”
>>> from pyspectator.processor import Cpu
>>> from time import sleep
>>> cpu = Cpu(monitoring_latency=1)
>>> with cpu:
... for _ in range(8):
... cpu.load, cpu.temperature
... sleep(1.1)
...
(22.6, 55)
(6.1, 55)
(5.5, 54)
(7.1, 54)
(5.6, 54)
(7.0, 54)
(10.2, 54)
(6.6, 54)
Release files for pyspectator 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyspectator-1.2.2.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyspectator-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.1 kB
Release files / pyspectator-1.2.2.tar.gz
| Download URL | pyspectator-1.2.2.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28fa6911de96e81cb61d5fa67b7940d432581edc3c26c44a7a80c374bf8bc939
|
|
BLAKE2b-256 checksum How to use checksums |
90aeecdbf52d6dde87ff9f6b7e09e4c5b6a5af40a738488f998167ba32500f0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Release files / pyspectator-1.2.2-py3-none-any.whl
| Download URL | pyspectator-1.2.2-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e4728c5a65f63e927b31d1179c3503940038ec8b823e9cc3ea5631e9e04a6a2
|
|
BLAKE2b-256 checksum How to use checksums |
b81e24f2e6af686e8faf95c6081277b3743d76d4be8d10fa1ecd0085cf6ccabd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|