# cjm-infra-plugin-system


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` bash
pip install cjm_infra_plugin_system
```

## Project Structure

    nbs/
    ├── core.ipynb             # Core data structures for infrastructure monitoring
    └── plugin_interface.ipynb # Domain-specific plugin interface for system monitoring

Total: 2 notebooks

## Module Dependencies

``` mermaid
graph LR
    core[core<br/>core]
    plugin_interface[plugin_interface<br/>plugin_interface]

    plugin_interface --> core
```

*1 cross-module dependencies detected*

## CLI Reference

No CLI commands found in this project.

## Module Overview

Detailed documentation for each module in the project:

### core (`core.ipynb`)

> Core data structures for infrastructure monitoring

#### Import

``` python
from cjm_infra_plugin_system.core import (
    SystemStats
)
```

#### Classes

``` python
@dataclass
class SystemStats:
    "Standardized snapshot of system resources."
    
    cpu_percent: float = 0.0  # Overall CPU utilization percentage
    memory_used_mb: float = 0.0  # Currently used system RAM in MB
    memory_total_mb: float = 0.0  # Total system RAM in MB
    memory_available_mb: float = 0.0  # Available system RAM in MB
    gpu_type: str = 'None'  # GPU vendor: 'NVIDIA', 'AMD', 'Intel', 'None'
    gpu_free_memory_mb: float = 0.0  # Free GPU memory in MB (sum of all visible devices)
    gpu_total_memory_mb: float = 0.0  # Total GPU memory in MB
    gpu_used_memory_mb: float = 0.0  # Used GPU memory in MB
    gpu_load_percent: float = 0.0  # GPU compute utilization percentage
    details: Dict[str, Any] = field(...)  # Per-device stats, temperatures, etc.
    
    def to_dict(self) -> Dict[str, Any]:  # Dictionary representation for JSON serialization
        "Convert to dictionary for JSON serialization."
```

### plugin_interface (`plugin_interface.ipynb`)

> Domain-specific plugin interface for system monitoring

#### Import

``` python
from cjm_infra_plugin_system.plugin_interface import (
    MonitorPlugin
)
```

#### Classes

``` python
class MonitorPlugin(PluginInterface):
    "Abstract base class for hardware monitoring plugins."
    
    def execute(
            self,
            command: str = "get_system_status",  # Command to execute
            **kwargs
        ) -> Dict[str, Any]:  # SystemStats as dictionary
        "Gather current system statistics and return as dictionary."
```
