Metadata-Version: 2.4
Name: idu-network-monitor
Version: 0.1.0
Summary: A network data usage monitor that generates beautiful HTML reports with interactive charts
Author-email: IDU Development Team <idu@example.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/yourusername/idu
Project-URL: Documentation, https://github.com/yourusername/idu#readme
Project-URL: Repository, https://github.com/yourusername/idu.git
Project-URL: Issues, https://github.com/yourusername/idu/issues
Keywords: network,monitor,data usage,bandwidth,internet,traffic,analytics,report,visualization
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: System :: Networking :: Monitoring
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: psutil>=5.9.0
Provides-Extra: notebook
Requires-Dist: pandas>=1.3.0; extra == "notebook"
Requires-Dist: plotly>=5.0.0; extra == "notebook"
Requires-Dist: jupyter>=1.0.0; extra == "notebook"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# Network Data Usage Monitor (IDU)

[![PyPI version](https://badge.fury.io/py/idu-network-monitor.svg)](https://badge.fury.io/py/idu-network-monitor)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A cross-platform Python tool to monitor and analyze internet data usage. Generates beautiful HTML reports with interactive charts showing network usage statistics over the last 60 days. Works on Windows, macOS, and Linux.

## Features

- 📊 **Real-time Network Statistics** - View current session download/upload data
- 📈 **60-Day Usage Analysis** - Estimated daily breakdown based on usage patterns
- 📉 **Interactive Charts** - Line charts and bar charts using Chart.js
- 📋 **Detailed Reports** - Daily breakdown with visual usage bars
- 🎨 **Beautiful HTML Reports** - Dark theme with modern UI design
- 📓 **Jupyter Notebook Support** - Interactive analysis with Plotly visualizations

## Installation

### From PyPI

```bash
pip install idu-network-monitor
```

### From Source

```bash
git clone https://github.com/yourusername/idu.git
cd idu
pip install -e .
```

## Quick Start

### Command Line

```bash
# Generate HTML report
idu-report

# Or run directly
python -m idu.report
```

### Python API

```python
from idu import generate_report

# Generate and open the HTML report
report_path = generate_report()
print(f"Report saved to: {report_path}")
```

### Jupyter Notebook

Open `examples/network_usage_analysis.ipynb` for an interactive analysis experience with:
- Per-interface statistics
- Interactive Plotly charts
- Weekly and day-of-week analysis

## Usage

### Generate Report

```bash
idu-report
```

This will:
1. Collect current network statistics using `psutil`
2. Generate estimated daily usage for the past 60 days
3. Create an HTML report with interactive charts
4. Open the report in your default browser

### Output

The tool generates:
- `network_usage_report.html` - Interactive HTML report

## Report Contents

### Current Session Statistics
- Downloaded data since last boot
- Uploaded data since last boot
- Session duration
- Total data transferred

### 60-Day Analysis
- Estimated total data usage
- Daily average usage
- Peak usage day
- Download vs Upload breakdown

### Visualizations
- **Line Chart**: Daily usage trend
- **Stacked Bar Chart**: Upload vs Download comparison
- **Usage Bars**: Visual comparison in the daily table

## Requirements

- Python 3.8+
- psutil >= 5.9.0

### Supported Platforms
- ✅ Windows
- ✅ macOS  
- ✅ Linux

## Dependencies

```
psutil>=5.9.0
```

For Jupyter Notebook analysis:
```
pandas>=1.3.0
plotly>=5.0.0
```

## How It Works

1. **Data Collection**: Uses `psutil` to get network I/O counters since system boot
2. **Estimation**: Calculates average daily usage from current session
3. **Variation**: Applies realistic daily/weekly variations to estimates
4. **Visualization**: Generates HTML with Chart.js for interactive charts

> **Note**: Most operating systems don't provide historical per-day network data. The daily breakdown is estimated based on current session usage patterns with realistic variations (weekends typically show higher usage).

## Project Structure

```
idu/
├── src/                           # Source code (package)
│   └── idu/
│       ├── __init__.py            # Package exports
│       ├── __main__.py            # CLI entry point
│       ├── report.py              # Main report generator
│       └── utils.py               # Utility functions
├── examples/                      # Usage examples
│   ├── standalone_report.py       # Standalone script example
│   └── network_usage_analysis.ipynb  # Jupyter notebook
├── docs/                          # Documentation
│   ├── architecture.tex           # Software architecture (LaTeX)
│   └── architecture.pdf           # Compiled documentation
├── tests/                         # Unit tests
│   └── test_report.py
├── dist/                          # Built packages
├── README.md
├── LICENSE
├── pyproject.toml
└── .gitignore
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

Created with ❤️ for network usage monitoring

## Changelog

### v0.1.0 (2026-01-10)
- Initial release
- HTML report generation
- 60-day usage estimation
- Interactive charts with Chart.js
- Jupyter notebook for analysis
