Skip to main content

cc.StatusQ-kit

Efficient monitoring and management of CPU status.

License: MIT Version test(https://github.com/Rick-torrellas/cc.StatusQ-kit/actions/workflows/main.yaml) Python Version Download docs Ask DeepWiki

📖 Description

StatusQ is a modular, event-driven monitoring engine designed to decouple system data collection from the presentation layer. Built on a robust Event Bus (Pub-Sub) architecture, it allows you to observe system metrics (like CPU, Memory, or Network) through a platform-agnostic core.


Installation

pip install cc.statusq-kit

Usage

from cc_statusq_cpu.core import StatusqCPU, CPUEventBus
from cc_statusq_cpu.capsule import PsutilCPUProvider
from cc_statusq_kit.core.StatusQ import StatusQ
from cc_statusq_kit.core.SystemEventBus import SystemEventBus
from cc_statusq_kit.capsule.CPUAdapter import CPUAdapter
from cc_statusq_kit.capsule.ConsoleAdapter import ConsoleAdapter

# 1. Initialize the Global System Event Bus
global_bus = SystemEventBus()
cpu_provider = PsutilCPUProvider()
# 2. Initialize Sub-system components (Specific to CPU Library)
cpu_bus = CPUEventBus()
cpu_app = StatusqCPU(provider=cpu_provider,event_bus=cpu_bus)
# 3. Create the Orchestrator
orchestrator = StatusQ(event_bus=global_bus)
# 4. Initialize and Register Adapters
# The ConsoleAdapter listens for HealthReportEvents on the global bus
console = ConsoleAdapter(global_bus=global_bus)

# The CPUAdapter translates specific CPU events into global HealthReportEvents
cpu_monitor = CPUAdapter(cpu_app=cpu_app, cpu_bus=cpu_bus, global_bus=global_bus)
orchestrator.register_child(console)
orchestrator.register_child(cpu_monitor)
# --- EXECUTION MODES ---
# MODE A: Single Pulse (Manual check)
print("--- Executing Single Pulse ---")
orchestrator.pulse_all()
# MODE B: Continuous Telemetry Stream (Multi-threaded)
print("\n--- Starting Telemetry Stream (Press Ctrl+C to stop) ---")
try:
    # Starts a background thread for each child to stream data every 2 seconds
    orchestrator.telemetry_stream(interval=2.0)
except KeyboardInterrupt:
    print("\nStopping orchestrator...")

📈 System Flow

  • Registration: Adapters are added to the StatusQ child list.
  • Trigger: When pulse_all() or telemetry_stream() is called, the orchestrator invokes the corresponding methods on the adapters.
  • Translation: The CPUAdapter captures hardware data and publishes a HealthReportEvent to the SystemEventBus.
  • Consumption: The ConsoleAdapter receives the event via the bus and displays the formatted metrics.

Metadata

Release files for cc.statusq-kit 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cc.statusq-kit 0.3.2
File Size Uploaded Provenance Actions
cc_statusq_kit-0.3.2.tar.gz 11.4 kB Without provenance Details for cc_statusq_kit-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cc.statusq-kit 0.3.2
File Interpreter ABI Platform Actions
cc_statusq_kit-0.3.2-py3-none-any.whl Python 3 none any Details for cc_statusq_kit-0.3.2-py3-none-any.whl

Total release size: 20.4 kB

Release files / cc_statusq_kit-0.3.2.tar.gz

Download URL cc_statusq_kit-0.3.2.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f5148cadf7496f086382c2d36e735a24fd6a287a4ec35e7d106afc84a48dd102
BLAKE2b-256 checksum
How to use checksums
8b45bf1ba05967f70c3803a6529c11c9a6d643869bc11ebf3e62c66cad962b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cc_statusq_kit-0.3.2-py3-none-any.whl

Download URL cc_statusq_kit-0.3.2-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4a402603848e66fe1afc7fcaff1b773f653f1bf29f12cfb04ca0f2b2f2c8082
BLAKE2b-256 checksum
How to use checksums
830694254be298b14311ada4824d61fe77d30fca9c88d4f8db40ded1672ca853
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for cc.statusq-kit 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page