Skip to main content

☁️ Cloud Insight AI

AI-powered AWS cost and log analysis - Use as a Python library OR web dashboard

Python 3.8+ License: MIT Contributions Welcome GitHub Stars


🎯 Two Ways to Use

1️⃣ Python Library (Pip Install)

Use Cloud Insight AI in your Python code for programmatic analysis.

2️⃣ Web Dashboard (Cloud-Based)

Run the interactive web interface for visual analysis and insights.


📦 Library Mode (Pip Package)

Installation

pip install cloud-insight-ai

Usage

from cloud_insight_ai import CloudAnalyzer

# Analyze your data
analyzer = CloudAnalyzer()
results = analyzer.run(cost_data, logs)
cost_data = [
    {'service': 'EC2', 'date': '2025-01-01', 'cost': 150.25},
    {'service': 'S3', 'date': '2025-01-01', 'cost': 45.50},
]

logs = [
    '2025-01-01 10:00:00 [INFO] Application started',
    '2025-01-01 10:05:30 [ERROR] Connection timeout',
]

# Analyze
analyzer = CloudAnalyzer()
result = analyzer.run(cost_data, logs)

# Results
print(f"Total cost: ${result['summary']['total_cost']:.2f}")
print(f"Errors: {result['summary']['error_count']}")
print(f"Alerts: {result['summary']['alert_count']}")

📚 Documentation

Basic Usage

# Full analysis
analyzer = CloudAnalyzer()
result = analyzer.run(cost_data, logs)

Cost Analysis Only

from cloud_insight_ai import analyze_cost

cost_result = analyze_cost(cost_data)
print(f"Total: ${cost_result['total_cost']:.2f}")
print(f"Top service: {cost_result['highest_cost_service']}")

Log Analysis Only

from cloud_insight_ai import analyze_logs

log_result = analyze_logs(logs)
print(f"Errors: {log_result['error_count']}")
print(f"Warnings: {log_result['warning_count']}")

With Configuration

config = {
    'cost_thresholds': {
        'high_cost_service_percent': 30.0
    },
    'log_thresholds': {
        'max_error_count': 15,
        'max_warning_count': 25
    },
    'error_patterns': [
        {'name': 'Connection Issues', 'keywords': ['connection', 'timeout']},
        {'name': 'Permission Errors', 'keywords': ['AccessDenied', 'unauthorized']}
    ]
}

analyzer = CloudAnalyzer(config=config)
result = analyzer.run(cost_data, logs)

# Check alerts
for alert in result['alerts']:
    print(f"[{alert['severity'].upper()}] {alert['message']}")

📊 Result Structure

{
    'cost': {
        'total_cost': 280.75,
        'service_totals': {'EC2': 150.25, 'S3': 45.50, 'RDS': 85.00},
        'daily_costs': {'2025-01-01': 280.75},
        'highest_cost_service': 'EC2',
        'highest_cost': 150.25
    },
    'logs': {
        'total_entries': 100,
        'error_count': 5,
        'warning_count': 10,
        'log_levels': {'INFO': 85, 'ERROR': 5, 'WARNING': 10},
        'recommendations': '...'
    },
    'alerts': [
        {'severity': 'high', 'category': 'cost', 'message': '...'}
    ],
    'summary': {
        'total_cost': 280.75,
        'total_services': 3,
        'total_log_entries': 100,
        'error_count': 5,
        'warning_count': 10,
        'alert_count': 1
    }
}

🧪 Testing

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=cloud_insight_ai

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


👤 Author

MUBENDIRAN


⭐ Show Your Support

If this project helped you, please consider giving it a ⭐ on GitHub!


Made with ❤️ by MUBENDIRAN

Download files

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

Source Distribution

cloud_insight_ai-1.0.0.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

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

cloud_insight_ai-1.0.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file cloud_insight_ai-1.0.0.tar.gz.

File metadata

  • Download URL: cloud_insight_ai-1.0.0.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cloud_insight_ai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9816e3ddb372c18afe87364fdb91620a306bebeb94d1b6761003f3c41ec3d155
MD5 2f651e615ec609ce65850b36538997a5
BLAKE2b-256 05a320b5e6c2b5b66b1e5e2f41b681267180c27ed40c27f00e22dba108a6e1c4

See more details on using hashes here.

File details

Details for the file cloud_insight_ai-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloud_insight_ai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c83e4f0acad7f6d4705f84a2acf56a5307c34804585e82462133e8df8e70e6e9
MD5 2ffdb5c05f91633f8a2ed5ef72a97508
BLAKE2b-256 9af883634c3cfecafed8036c0028d51cb20f16f0fe74db2fde8daaa00067bc25

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

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