Skip to main content

A network data usage monitor that generates beautiful HTML reports with interactive charts

Project description

Network Data Usage Monitor (IDU)

PyPI version Python 3.8+ License: 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

pip install idu-network-monitor

From Source

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

Quick Start

Command Line

# Generate HTML report
idu-report

# Or run directly
python -m idu.report

Python API

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

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 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idu_network_monitor-0.1.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idu_network_monitor-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file idu_network_monitor-0.1.0.tar.gz.

File metadata

  • Download URL: idu_network_monitor-0.1.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for idu_network_monitor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40ba1e7c8f9b738134efdd801d0fc3e3f98fb5fcba279f567be022d614283fb0
MD5 f69627598c0627846e49da1307f43a03
BLAKE2b-256 29503f36e2d2dafbc46ad731ddc049f149f436c21b9d427833425c4120e7e7f5

See more details on using hashes here.

File details

Details for the file idu_network_monitor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for idu_network_monitor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fbf6e206915959e945b32ab7f6abc4161e53c6bf09c22e768d7554cba70ba15
MD5 8dd0eda135771fa733c5b5d317116970
BLAKE2b-256 f9bd340e67b5d5b1244b73a8361ae3552d29553cf725083c821f007175ffde58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page