Metadata-Version: 2.2
Name: python_energy_monitor
Version: 0.0.1
Summary: A Python package to monitor energy consumption and CO2 emissions for LLM models and other computational tasks.
Home-page: https://github.com/codemaker2015/energy_monitor
Author: Vishnu Sivan
Author-email: Vishnu Sivan <codemaker2015@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Vishnu Sivan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/codemaker2015/energy_monitor
Project-URL: Issues, https://github.com/codemaker2015/energy_monitor/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: psutil
Requires-Dist: pynvml
Requires-Dist: codecarbon
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# Energy Monitor

A Python package to monitor energy consumption and CO2 emissions for LLM models and other computational tasks. The package provides tools to track power usage of both CPU and GPU, as well as monitor system memory usage. It also estimates CO2 emissions based on energy consumption.

## Features

- Monitors CPU power usage
- Monitors GPU power usage (NVIDIA GPUs only)
- Monitors memory usage
- Estimates CO2 emissions based on energy consumption

## Installation

You can install the package using pip:

```bash
pip install python-energy-monitor
```
## Usage

You can use the EnergyMonitor class to start monitoring energy consumption and CO2 emissions:

```python
from energy_monitor import EnergyMonitor

# Initialize the energy monitor
monitor = EnergyMonitor()

# Log energy consumption data
monitor.log_energy_consumption()

# Stop the emissions tracker and get CO2 emissions
monitor.stop_tracker()

# Shutdown the monitor
monitor.shutdown()
```

## Requirements

- Python 3.6+
- psutil
- pynvml (for NVIDIA GPU monitoring)
- codecarbon (for CO2 emissions tracking)
