Skip to main content

Cross-platform system stats made easy

Project description

statz

statz is a cross-platform Python package that fetches real-time system usage and hardware specs — all wrapped in a simple, clean API.

Works on macOS, Linux, and Windows, and handles OS-specific madness under the hood so you don’t have to.

drawing

✨ Features

  • 📊 Get real-time CPU, RAM, and disk usage
  • 💻 Fetch detailed system specifications (CPU, RAM, OS, etc.)
  • 🧠 Automatically handles platform-specific logic
  • 🧼 Super clean API — just a few functions, no fluff

📦 Installation

pip install statz

💻 CLI Usage

statz comes with a powerful command-line interface that lets you get system information right from your terminal.

Basic Usage

# Get all system specs
statz --specs

# Get all system usage
statz --usage

# Get top processes
statz --processes

# Get temperature readings
statz --temp

# Launch live dashboard
statz --dashboard

Live Dashboard

The live dashboard provides real-time monitoring of your system with an interactive interface:

# Launch the dashboard
statz --dashboard

The dashboard displays:

  • 📊 Real-time CPU usage per core
  • 🧠 Memory usage and availability
  • 💾 Disk I/O speeds
  • 🌐 Network upload/download speeds
  • 🔋 Battery status (if available)
  • 🌡️ Temperature readings (if available)

Press Ctrl+C to exit the dashboard.


### Component-Specific Information

You can get information for specific components using these flags:

```bash
# Individual components
statz --specs --cpu        # CPU specifications
statz --specs --ram        # RAM information
statz --specs --disk       # Disk/storage info
statz --specs --gpu        # GPU information (Windows only)
statz --specs --network    # Network adapter info
statz --specs --battery    # Battery information
statz --specs --os         # Operating system info

# Combine multiple components
statz --specs --cpu --ram --disk
statz --usage --cpu --ram --network

Process Monitoring

# Get top 5 processes by CPU usage (default)
statz --processes

# Get top 10 processes by CPU usage
statz --processes --process-count 10

# Get top 5 processes by memory usage
statz --processes --process-type mem

# Get top 15 processes by memory usage
statz --processes --process-count 15 --process-type mem

Output Formats

# JSON output
statz --specs --json
statz --usage --cpu --ram --json

# Export to file
statz --specs --out
statz --usage --processes --out

Available Flags

Flag Description
--specs Get system specifications
--usage Get real-time system usage
--processes Get top processes information
--temp Get temperature readings
--dashboard Launch live monitoring dashboard
--os Operating system information
--cpu CPU information
--gpu GPU information (Windows only)
--ram RAM/memory information
--disk Disk/storage information
--network Network adapter information
--battery Battery information
--json Output in JSON format
--out Export to JSON file
--process-count N Number of processes to show (default: 5)
--process-type {cpu,mem} Sort processes by CPU or memory usage

Examples

# Get CPU and RAM specs in JSON format
statz --specs --cpu --ram --json

# Monitor top 10 memory-intensive processes
statz --processes --process-count 10 --process-type mem

# Get all usage data and export to file
statz --usage --out

# Get system temperatures and CPU usage
statz --temp --usage --cpu

# Get complete system overview
statz --specs --usage --processes --temp

# Launch interactive dashboard for real-time monitoring
statz --dashboard

PyPi Project 🐍

Github Repository 🧑‍💻

📝 Changelog

v1.1.0 – Performance Improvements 🚀

  • Selective Fetching for System Specs 🛠️
    • Improved performance by allowing selective fetching of system specifications.
    • Added support for fetching only requested components (e.g., CPU, RAM, Disk) to avoid unnecessary computations.
  • Enhanced CLI Integration 💻
    • Updated CLI to support selective fetching flags for --specs and --usage.
    • Improved error handling and default values for missing or unsupported components.
  • Refactored Platform-Specific Functions 🧹
    • Updated _get_windows_specs, _get_linux_specs, and _get_mac_specs to handle selective fetching.
    • Added meaningful error messages and default values for null or missing data.
  • Documentation Updates 📚
    • Updated docstrings across platform-specific functions to reflect performance improvements.

📝 Side Note

If you find any errors on Linux, please report them to me with as much detail as possible as I do not have a Linux machine.

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

statz-1.1.0.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

statz-1.1.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file statz-1.1.0.tar.gz.

File metadata

  • Download URL: statz-1.1.0.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for statz-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1c4d5fed4ea23c7b2d479ac518b1baa1973f7c1e246aafb7a35a1071de2b0e73
MD5 b4bafa26ba81e3ab4cff48ee439365c1
BLAKE2b-256 8ada0f2ae59fac08edd9d9f1350e6fdb687d9e38e2d09ae5ac99bb4a0a5cd1a7

See more details on using hashes here.

File details

Details for the file statz-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: statz-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for statz-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0183caa2c389ecb2c2e05884a5dd66036556b3ce0f5ea0f2728710db71147503
MD5 630c22b7cea4de8710b5f484558a1b81
BLAKE2b-256 17c261d2fbb153eb78759dc828cdac5350253ea1c526134fc691009c9441d84c

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