Metadata-Version: 2.4
Name: cjm-infra-plugin-system
Version: 0.0.1
Summary: Standardized interface and data structures for infrastructure monitoring plugins in the cjm-plugin-system ecosystem.
Home-page: https://github.com/cj-mills/cjm-infra-plugin-system
Author: Christian J. Mills
Author-email: 9126128+cj-mills@users.noreply.github.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cjm_plugin_system
Provides-Extra: dev
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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."
```
