smart-rds-viewer


Namesmart-rds-viewer JSON
Version 0.1.22 PyPI version JSON
download
home_pageNone
SummaryYour terminal companion for monitoring Amazon RDS instances with real-time data, pricing, and interactive insights!
upload_time2025-08-11 03:02:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords aws rds monitoring cloudwatch pricing terminal cli
VCS
bugtrack_url
requirements boto3 rich typer readchar pytz
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Smart RDS Viewer

> **Your terminal companion for monitoring Amazon RDS instances with real-time data, pricing, and interactive insights!**

<!-- markdownlint-disable MD033 -->
<img src="https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/smart-rds-viewer-logo.png" alt="Smart RDS Viewer" width="100">
<!-- markdownlint-enable MD033 -->

A powerful, full-screen terminal CLI that fetches and displays all your Amazon RDS instances with live metrics, pricing, and interactive sorting - all from the comfort of your terminal.

![Smart RDS Viewer Demo](https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/image.png)

![Smart RDS Viewer Demo - Help Menu](https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/image-help.png)

![Smart RDS Viewer Demo - RI Utilization](https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/image-ri.png)

## ✨ Features

- **🔧 Backup & Maintenance View**: Complete operational monitoring with backup windows, retention policies, and maintenance schedules
- **🎯 Smart Column Sorting**: Intuitive 1-9 then a-z shortcuts with visual indicators for active sort column and direction
- **🎨 Visual Sort Feedback**: Colorful underlines and directional arrows show exactly what's being sorted and how
- **📏 Dynamic Responsive Design**: Adaptive column widths that automatically optimize for your terminal size
- **🕐 Intelligent Time Handling**: Local timezone conversion and chronological sorting for time-based columns
- **⚡ Enhanced Performance**: Optimized sorting algorithms for numeric, time-based, and special value handling

## ✨ Core Features

### 🔍 **Real-time Data Fetching**

- **RDS Metadata**: Fetches all RDS instances using `boto3`
- **CloudWatch Metrics**: Live storage usage from CloudWatch APIs
- **Live Pricing**: On-demand hourly and monthly pricing from AWS Pricing API
- **Smart Caching**: 24-hour pricing cache in `/tmp` for faster subsequent runs

### 📊 **Rich Interactive Table**

- **Full-screen Terminal**: Professional full-screen interface like `eks-node-viewer`
- **Comprehensive Columns**: 12+ metrics including all pricing components
- **Smart Highlighting**: Targeted red highlighting for storage issues (≥80% usage)
- **Multi-AZ Support**: 👥 indicators with accurate 2x pricing for Multi-AZ instances
- **Aurora Compatible**: Special handling for Aurora instances and pricing
- **Real-time Updates**: Live data refresh with loading spinners

### 🎮 **Interactive Controls**

- **Intuitive Shortcuts**: Simple 1-9 then a-z keys for column sorting (1=Name, 2=Class, etc.)
- **Visual Sort Indicators**: Colorful underlines and arrows (↑↓) show active sort column and direction
- **Smart Sorting**: Toggle ascending/descending with same key, handles time-based and numeric data intelligently
- **Multi-View Interface**: Three integrated views accessible via keyboard shortcuts
  - **Pricing View** (`V`): Cost analysis with hourly/monthly toggle
  - **Backup & Maintenance View** (`B`): Backup windows, retention, maintenance schedules
  - **RI Utilization View** (`R`): Reserved Instance coverage and utilization
- **Dynamic Spacing**: Responsive column widths that adapt to terminal size
- **Pricing Toggle**: Press `m` to switch between hourly and monthly cost views
- **Help System**: Press `?` for interactive help overlay with context-aware shortcuts
- **Clean Exit**: `q` or `Ctrl+C` to exit with terminal cleanup
- **Arrow Key Navigation**: Use `←`/`→` or `Tab`/`Shift+Tab` for seamless view cycling

### 📈 **Comprehensive Metrics**

- **Instance Details**: Name, class, Multi-AZ indicators (👥)
- **Storage Analytics**: Used percentage, free space in GiB
- **Performance**: IOPS, EBS throughput (with GP2/GP3 awareness)
- **Complete Cost Breakdown**: Instance, Storage, IOPS, and EBS Throughput pricing
- **Flexible Cost Views**: Toggle between hourly and monthly pricing with daily/monthly estimates
- **Backup & Maintenance**: Backup windows, retention periods, maintenance schedules with local timezone display
- **Operational Insights**: Next maintenance timing, pending actions, and maintenance urgency indicators

### 💰 **Reserved Instance (RI) Analysis**

- **Comprehensive RI Support**: Automatic RI discovery with size flexibility matching
- **Cost Optimization**: Real-time coverage analysis and savings calculations
- **Visual Indicators**: Color-coded instance names based on RI coverage

> 📖 **Detailed RI Documentation**: See [docs/RESERVED-INSTANCES.md](docs/RESERVED-INSTANCES.md) for complete RI feature documentation, size flexibility algorithms, and implementation details.

## 🛠️ Installation

### Prerequisites

- Python 3.8+
- AWS credentials configured (environment variables or IAM profile)
- Required AWS permissions for RDS, CloudWatch, Pricing, and Reserved Instance APIs

### AWS Configuration

Set your AWS profile and region (recommended):

```bash
export AWS_PROFILE=your-profile-name
export AWS_REGION=your-region  # e.g., us-east-1, ap-south-1
```

**Required AWS Permissions:**

- `rds:DescribeDBInstances` - Fetch RDS instance metadata
- `rds:DescribeReservedDBInstances` - Reserved Instance information
- `rds:DescribePendingMaintenanceActions` - Maintenance and backup information
- `cloudwatch:GetMetricStatistics` - Storage usage metrics
- `pricing:GetProducts` - Live pricing data

### Quick Start

#### Option 1: Install via pip (Recommended)

```bash
# Install the package
pip install smart-rds-viewer

# Run the viewer
smart-rds-viewer
```

#### Option 2: Development/Local Installation

```bash
# Clone and setup
git clone <your-repo>
cd smart-rds-viewer

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .

# Run the viewer
smart-rds-viewer
```

#### Option 3: Run as Python Script

```bash
# Clone and setup
git clone <your-repo>
cd smart-rds-viewer

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the viewer
python rds_viewer.py
```

## 🎯 Usage

### Basic Usage

```bash
# Standard run
smart-rds-viewer

# Alternative command (shorter)
rds-viewer

# Check version
smart-rds-viewer --version

# Force fresh pricing data (bypass cache)
smart-rds-viewer --nocache

# Legacy method (if running from source)
python rds_viewer.py --nocache
```

### Interactive Controls

- **Column Sorting**: Press number keys (1-9) then letters (a-z) to sort by any column
- **Visual Feedback**: Active sort column shows colorful underline and direction arrows (↑↓)
- **View Navigation**:
  - `Shift+V` - Pricing View (main cost analysis)
  - `Shift+B` - Backup & Maintenance View
  - `Shift+R` - Reserved Instance Utilization View
- **Pricing Toggle**: Press `m` to switch between hourly and monthly costs
- **Help**: Press `?` to toggle context-aware help overlay
- **Quit**: Press `q` or `Ctrl+C` to exit

### Column Shortcuts (Consistent across all views)

#### Pricing View

| Key | Column                        | Description                           |
| --- | ----------------------------- | ------------------------------------- |
| `1` | Name                          | Instance identifier (👥 = Multi-AZ)   |
| `2` | Class                         | Instance type (db.r5.large, etc.)     |
| `3` | Storage (GB)                  | Allocated storage                     |
| `4` | % Used                        | Storage utilization percentage        |
| `5` | Free (GiB)                    | Available storage space               |
| `6` | IOPS                          | Provisioned IOPS                      |
| `7` | EBS Throughput                | Storage throughput (MB/s)             |
| `8` | Instance ($/hr or $/mo)       | Instance pricing (toggles with `m`)   |
| `9` | Storage ($/hr or $/mo)        | Storage pricing (toggles with `m`)    |
| `a` | IOPS ($/hr or $/mo)           | IOPS pricing (toggles with `m`)       |
| `b` | EBS Throughput ($/hr or $/mo) | Throughput pricing (toggles with `m`) |
| `c` | Total ($/hr or $/mo)          | Total cost (toggles with `m`)         |

#### Backup & Maintenance View

| Key | Column             | Description                          |
| --- | ------------------ | ------------------------------------ |
| `1` | Name               | Instance identifier (👥 = Multi-AZ)  |
| `2` | Class              | Instance type                        |
| `3` | Engine             | Database engine (MySQL, PostgreSQL)  |
| `4` | Storage            | Allocated storage                    |
| `5` | Backup Window      | Daily backup time window (local TZ)  |
| `6` | Retention          | Backup retention period (days)       |
| `7` | Maintenance Window | Weekly maintenance window (local TZ) |
| `8` | Next               | Next maintenance timing              |
| `9` | Pending Actions    | Pending maintenance actions          |

### Special Controls

| Key       | Function       | Description                        |
| --------- | -------------- | ---------------------------------- |
| `m`       | Pricing Toggle | Switch between hourly/monthly view |
| `Shift+V` | Pricing View   | Go to main pricing/cost view       |
| `Shift+B` | Backup View    | Go to backup & maintenance view    |
| `Shift+R` | RI View        | Go to Reserved Instance view       |
| `?`       | Help           | Show/hide interactive help overlay |
| `q`       | Quit           | Exit application                   |

### Navigation Controls

| Key         | Function       | Description                         |
| ----------- | -------------- | ----------------------------------- |
| `←`         | Previous Tab   | Cycle to previous view (infinite)   |
| `→`         | Next Tab       | Cycle to next view (infinite)       |
| `Tab`       | Cycle Forward  | Navigate between views sequentially |
| `Shift+Tab` | Cycle Backward | Navigate between views in reverse   |

### Visual Indicators

- **🔵 Cyan Underline ↑**: Column sorted ascending
- **🟣 Magenta Underline ↓**: Column sorted descending
- **👥**: Multi-AZ instance (2x pricing)
- **🟢 Green**: Low urgency maintenance (>7 days)
- **🟡 Yellow**: Medium urgency maintenance (1-7 days)
- **🔴 Red**: High urgency maintenance (overdue/today)

## 🔧 Technical Details

### Architecture

- **Modular Design**: Separate modules for fetching, metrics, pricing, and UI
- **Error Handling**: Graceful fallbacks for API failures
- **Caching**: Smart pricing cache with 24-hour expiration
- **Full-screen UI**: Rich-based terminal interface

### AWS APIs Used

- **RDS**: `describe_db_instances` for metadata, `describe_reserved_db_instances` for RI data, `describe_pending_maintenance_actions` for maintenance info
- **CloudWatch**: `get_metric_statistics` for storage metrics
- **Pricing**: `get_products` for live pricing data

### Cache System

- **Location**: `/tmp/rds_pricing_cache.json`
- **Duration**: 24 hours
- **Auto-refresh**: Expired cache triggers fresh API calls
- **Manual override**: Use `--nocache` flag to force fresh data
- **Error Recovery**: Corrupted cache falls back to API

## 🤖 Built with AI Assistance

This tool was collaboratively developed with the help of **Claude Sonnet 4**, an AI coding assistant. The development process involved:

- **Architecture Design**: Modular structure with separate modules for different concerns
- **Feature Implementation**: Real-time data fetching, caching, interactive UI
- **Problem Solving**: Debugging pricing API issues, fixing cache serialization
- **User Experience**: Full-screen terminal interface, dynamic shortcuts, help system
- **Documentation**: Comprehensive README with all features and future roadmap

The AI assistant helped transform a simple concept into a comprehensive, production-ready RDS monitoring tool with advanced features like smart caching, interactive sorting, and professional terminal UI.

## 📁 Project Structure

The project follows a modular architecture with separate modules for different concerns:

- **Core modules**: `rds_viewer.py`, `ui.py`, `fetch.py`, `metrics.py`, `pricing.py`
- **Documentation**: Comprehensive docs in `docs/` directory
- **Development tools**: Debug scripts in `scripts/` and performance benchmarks in `benchmarks/`

> 📖 **Performance Details**: See [docs/BENCHMARKING.md](docs/BENCHMARKING.md) for detailed performance optimizations, benchmarking results, and optimization techniques.

## 🛠️ Development & Contributing

The project includes comprehensive development tools and documentation:

- **Debug Tools**: Pricing analysis and debugging scripts in `scripts/` directory
- **Performance Testing**: Benchmarking tools in `benchmarks/` directory
- **Development Setup**: Complete setup instructions and guidelines

> 📖 **Development Documentation**:
>
> - [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines and development setup
> - [docs/BENCHMARKING.md](docs/BENCHMARKING.md) - Performance testing and optimization
> - [docs/PUBLISHING.md](docs/PUBLISHING.md) - PyPI publishing workflow
> - [SECURITY.md](SECURITY.md) - Security policy and vulnerability reporting

## 📦 Publishing to PyPI

For maintainers: To publish this package to PyPI, see the detailed publishing guide in [docs/PUBLISHING.md](docs/PUBLISHING.md) with complete workflows, testing procedures, and troubleshooting tips.

## 🤝 Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on development setup, code standards, and contribution workflows.

## 📄 License

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

## 🙏 Acknowledgments

- Built with [Rich](https://github.com/Textualize/rich) for beautiful terminal UI
- Powered by [boto3](https://github.com/boto/boto3) for AWS integration
- Inspired by modern CLI tools like `eks-node-viewer`
- **AI Development Partner**: Claude Sonnet 4 for collaborative coding and problem-solving
- [@sachincool](https://github.com/sachincool) for the cool logo 🫡
- [@kutumbtech](https://github.com/kutumbtech) for everything 🙏

---

## Happy RDS monitoring! 🎉

_Your terminal is now your RDS command center!_

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "smart-rds-viewer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Smart RDS Viewer <hello@kratik.dev>",
    "keywords": "aws, rds, monitoring, cloudwatch, pricing, terminal, cli",
    "author": null,
    "author_email": "Smart RDS Viewer <hello@kratik.dev>",
    "download_url": "https://files.pythonhosted.org/packages/0f/ec/698055c6d88c679829f419f51d48daf4129a77cd3a7c2c536baeb067ae77/smart_rds_viewer-0.1.22.tar.gz",
    "platform": null,
    "description": "# Smart RDS Viewer\n\n> **Your terminal companion for monitoring Amazon RDS instances with real-time data, pricing, and interactive insights!**\n\n<!-- markdownlint-disable MD033 -->\n<img src=\"https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/smart-rds-viewer-logo.png\" alt=\"Smart RDS Viewer\" width=\"100\">\n<!-- markdownlint-enable MD033 -->\n\nA powerful, full-screen terminal CLI that fetches and displays all your Amazon RDS instances with live metrics, pricing, and interactive sorting - all from the comfort of your terminal.\n\n![Smart RDS Viewer Demo](https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/image.png)\n\n![Smart RDS Viewer Demo - Help Menu](https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/image-help.png)\n\n![Smart RDS Viewer Demo - RI Utilization](https://github.com/k4kratik/smart-rds-viewer/raw/main/docs/image-ri.png)\n\n## \u2728 Features\n\n- **\ud83d\udd27 Backup & Maintenance View**: Complete operational monitoring with backup windows, retention policies, and maintenance schedules\n- **\ud83c\udfaf Smart Column Sorting**: Intuitive 1-9 then a-z shortcuts with visual indicators for active sort column and direction\n- **\ud83c\udfa8 Visual Sort Feedback**: Colorful underlines and directional arrows show exactly what's being sorted and how\n- **\ud83d\udccf Dynamic Responsive Design**: Adaptive column widths that automatically optimize for your terminal size\n- **\ud83d\udd50 Intelligent Time Handling**: Local timezone conversion and chronological sorting for time-based columns\n- **\u26a1 Enhanced Performance**: Optimized sorting algorithms for numeric, time-based, and special value handling\n\n## \u2728 Core Features\n\n### \ud83d\udd0d **Real-time Data Fetching**\n\n- **RDS Metadata**: Fetches all RDS instances using `boto3`\n- **CloudWatch Metrics**: Live storage usage from CloudWatch APIs\n- **Live Pricing**: On-demand hourly and monthly pricing from AWS Pricing API\n- **Smart Caching**: 24-hour pricing cache in `/tmp` for faster subsequent runs\n\n### \ud83d\udcca **Rich Interactive Table**\n\n- **Full-screen Terminal**: Professional full-screen interface like `eks-node-viewer`\n- **Comprehensive Columns**: 12+ metrics including all pricing components\n- **Smart Highlighting**: Targeted red highlighting for storage issues (\u226580% usage)\n- **Multi-AZ Support**: \ud83d\udc65 indicators with accurate 2x pricing for Multi-AZ instances\n- **Aurora Compatible**: Special handling for Aurora instances and pricing\n- **Real-time Updates**: Live data refresh with loading spinners\n\n### \ud83c\udfae **Interactive Controls**\n\n- **Intuitive Shortcuts**: Simple 1-9 then a-z keys for column sorting (1=Name, 2=Class, etc.)\n- **Visual Sort Indicators**: Colorful underlines and arrows (\u2191\u2193) show active sort column and direction\n- **Smart Sorting**: Toggle ascending/descending with same key, handles time-based and numeric data intelligently\n- **Multi-View Interface**: Three integrated views accessible via keyboard shortcuts\n  - **Pricing View** (`V`): Cost analysis with hourly/monthly toggle\n  - **Backup & Maintenance View** (`B`): Backup windows, retention, maintenance schedules\n  - **RI Utilization View** (`R`): Reserved Instance coverage and utilization\n- **Dynamic Spacing**: Responsive column widths that adapt to terminal size\n- **Pricing Toggle**: Press `m` to switch between hourly and monthly cost views\n- **Help System**: Press `?` for interactive help overlay with context-aware shortcuts\n- **Clean Exit**: `q` or `Ctrl+C` to exit with terminal cleanup\n- **Arrow Key Navigation**: Use `\u2190`/`\u2192` or `Tab`/`Shift+Tab` for seamless view cycling\n\n### \ud83d\udcc8 **Comprehensive Metrics**\n\n- **Instance Details**: Name, class, Multi-AZ indicators (\ud83d\udc65)\n- **Storage Analytics**: Used percentage, free space in GiB\n- **Performance**: IOPS, EBS throughput (with GP2/GP3 awareness)\n- **Complete Cost Breakdown**: Instance, Storage, IOPS, and EBS Throughput pricing\n- **Flexible Cost Views**: Toggle between hourly and monthly pricing with daily/monthly estimates\n- **Backup & Maintenance**: Backup windows, retention periods, maintenance schedules with local timezone display\n- **Operational Insights**: Next maintenance timing, pending actions, and maintenance urgency indicators\n\n### \ud83d\udcb0 **Reserved Instance (RI) Analysis**\n\n- **Comprehensive RI Support**: Automatic RI discovery with size flexibility matching\n- **Cost Optimization**: Real-time coverage analysis and savings calculations\n- **Visual Indicators**: Color-coded instance names based on RI coverage\n\n> \ud83d\udcd6 **Detailed RI Documentation**: See [docs/RESERVED-INSTANCES.md](docs/RESERVED-INSTANCES.md) for complete RI feature documentation, size flexibility algorithms, and implementation details.\n\n## \ud83d\udee0\ufe0f Installation\n\n### Prerequisites\n\n- Python 3.8+\n- AWS credentials configured (environment variables or IAM profile)\n- Required AWS permissions for RDS, CloudWatch, Pricing, and Reserved Instance APIs\n\n### AWS Configuration\n\nSet your AWS profile and region (recommended):\n\n```bash\nexport AWS_PROFILE=your-profile-name\nexport AWS_REGION=your-region  # e.g., us-east-1, ap-south-1\n```\n\n**Required AWS Permissions:**\n\n- `rds:DescribeDBInstances` - Fetch RDS instance metadata\n- `rds:DescribeReservedDBInstances` - Reserved Instance information\n- `rds:DescribePendingMaintenanceActions` - Maintenance and backup information\n- `cloudwatch:GetMetricStatistics` - Storage usage metrics\n- `pricing:GetProducts` - Live pricing data\n\n### Quick Start\n\n#### Option 1: Install via pip (Recommended)\n\n```bash\n# Install the package\npip install smart-rds-viewer\n\n# Run the viewer\nsmart-rds-viewer\n```\n\n#### Option 2: Development/Local Installation\n\n```bash\n# Clone and setup\ngit clone <your-repo>\ncd smart-rds-viewer\n\n# Create virtual environment\npython3 -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install in development mode\npip install -e .\n\n# Run the viewer\nsmart-rds-viewer\n```\n\n#### Option 3: Run as Python Script\n\n```bash\n# Clone and setup\ngit clone <your-repo>\ncd smart-rds-viewer\n\n# Create virtual environment\npython3 -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Run the viewer\npython rds_viewer.py\n```\n\n## \ud83c\udfaf Usage\n\n### Basic Usage\n\n```bash\n# Standard run\nsmart-rds-viewer\n\n# Alternative command (shorter)\nrds-viewer\n\n# Check version\nsmart-rds-viewer --version\n\n# Force fresh pricing data (bypass cache)\nsmart-rds-viewer --nocache\n\n# Legacy method (if running from source)\npython rds_viewer.py --nocache\n```\n\n### Interactive Controls\n\n- **Column Sorting**: Press number keys (1-9) then letters (a-z) to sort by any column\n- **Visual Feedback**: Active sort column shows colorful underline and direction arrows (\u2191\u2193)\n- **View Navigation**:\n  - `Shift+V` - Pricing View (main cost analysis)\n  - `Shift+B` - Backup & Maintenance View\n  - `Shift+R` - Reserved Instance Utilization View\n- **Pricing Toggle**: Press `m` to switch between hourly and monthly costs\n- **Help**: Press `?` to toggle context-aware help overlay\n- **Quit**: Press `q` or `Ctrl+C` to exit\n\n### Column Shortcuts (Consistent across all views)\n\n#### Pricing View\n\n| Key | Column                        | Description                           |\n| --- | ----------------------------- | ------------------------------------- |\n| `1` | Name                          | Instance identifier (\ud83d\udc65 = Multi-AZ)   |\n| `2` | Class                         | Instance type (db.r5.large, etc.)     |\n| `3` | Storage (GB)                  | Allocated storage                     |\n| `4` | % Used                        | Storage utilization percentage        |\n| `5` | Free (GiB)                    | Available storage space               |\n| `6` | IOPS                          | Provisioned IOPS                      |\n| `7` | EBS Throughput                | Storage throughput (MB/s)             |\n| `8` | Instance ($/hr or $/mo)       | Instance pricing (toggles with `m`)   |\n| `9` | Storage ($/hr or $/mo)        | Storage pricing (toggles with `m`)    |\n| `a` | IOPS ($/hr or $/mo)           | IOPS pricing (toggles with `m`)       |\n| `b` | EBS Throughput ($/hr or $/mo) | Throughput pricing (toggles with `m`) |\n| `c` | Total ($/hr or $/mo)          | Total cost (toggles with `m`)         |\n\n#### Backup & Maintenance View\n\n| Key | Column             | Description                          |\n| --- | ------------------ | ------------------------------------ |\n| `1` | Name               | Instance identifier (\ud83d\udc65 = Multi-AZ)  |\n| `2` | Class              | Instance type                        |\n| `3` | Engine             | Database engine (MySQL, PostgreSQL)  |\n| `4` | Storage            | Allocated storage                    |\n| `5` | Backup Window      | Daily backup time window (local TZ)  |\n| `6` | Retention          | Backup retention period (days)       |\n| `7` | Maintenance Window | Weekly maintenance window (local TZ) |\n| `8` | Next               | Next maintenance timing              |\n| `9` | Pending Actions    | Pending maintenance actions          |\n\n### Special Controls\n\n| Key       | Function       | Description                        |\n| --------- | -------------- | ---------------------------------- |\n| `m`       | Pricing Toggle | Switch between hourly/monthly view |\n| `Shift+V` | Pricing View   | Go to main pricing/cost view       |\n| `Shift+B` | Backup View    | Go to backup & maintenance view    |\n| `Shift+R` | RI View        | Go to Reserved Instance view       |\n| `?`       | Help           | Show/hide interactive help overlay |\n| `q`       | Quit           | Exit application                   |\n\n### Navigation Controls\n\n| Key         | Function       | Description                         |\n| ----------- | -------------- | ----------------------------------- |\n| `\u2190`         | Previous Tab   | Cycle to previous view (infinite)   |\n| `\u2192`         | Next Tab       | Cycle to next view (infinite)       |\n| `Tab`       | Cycle Forward  | Navigate between views sequentially |\n| `Shift+Tab` | Cycle Backward | Navigate between views in reverse   |\n\n### Visual Indicators\n\n- **\ud83d\udd35 Cyan Underline \u2191**: Column sorted ascending\n- **\ud83d\udfe3 Magenta Underline \u2193**: Column sorted descending\n- **\ud83d\udc65**: Multi-AZ instance (2x pricing)\n- **\ud83d\udfe2 Green**: Low urgency maintenance (>7 days)\n- **\ud83d\udfe1 Yellow**: Medium urgency maintenance (1-7 days)\n- **\ud83d\udd34 Red**: High urgency maintenance (overdue/today)\n\n## \ud83d\udd27 Technical Details\n\n### Architecture\n\n- **Modular Design**: Separate modules for fetching, metrics, pricing, and UI\n- **Error Handling**: Graceful fallbacks for API failures\n- **Caching**: Smart pricing cache with 24-hour expiration\n- **Full-screen UI**: Rich-based terminal interface\n\n### AWS APIs Used\n\n- **RDS**: `describe_db_instances` for metadata, `describe_reserved_db_instances` for RI data, `describe_pending_maintenance_actions` for maintenance info\n- **CloudWatch**: `get_metric_statistics` for storage metrics\n- **Pricing**: `get_products` for live pricing data\n\n### Cache System\n\n- **Location**: `/tmp/rds_pricing_cache.json`\n- **Duration**: 24 hours\n- **Auto-refresh**: Expired cache triggers fresh API calls\n- **Manual override**: Use `--nocache` flag to force fresh data\n- **Error Recovery**: Corrupted cache falls back to API\n\n## \ud83e\udd16 Built with AI Assistance\n\nThis tool was collaboratively developed with the help of **Claude Sonnet 4**, an AI coding assistant. The development process involved:\n\n- **Architecture Design**: Modular structure with separate modules for different concerns\n- **Feature Implementation**: Real-time data fetching, caching, interactive UI\n- **Problem Solving**: Debugging pricing API issues, fixing cache serialization\n- **User Experience**: Full-screen terminal interface, dynamic shortcuts, help system\n- **Documentation**: Comprehensive README with all features and future roadmap\n\nThe AI assistant helped transform a simple concept into a comprehensive, production-ready RDS monitoring tool with advanced features like smart caching, interactive sorting, and professional terminal UI.\n\n## \ud83d\udcc1 Project Structure\n\nThe project follows a modular architecture with separate modules for different concerns:\n\n- **Core modules**: `rds_viewer.py`, `ui.py`, `fetch.py`, `metrics.py`, `pricing.py`\n- **Documentation**: Comprehensive docs in `docs/` directory\n- **Development tools**: Debug scripts in `scripts/` and performance benchmarks in `benchmarks/`\n\n> \ud83d\udcd6 **Performance Details**: See [docs/BENCHMARKING.md](docs/BENCHMARKING.md) for detailed performance optimizations, benchmarking results, and optimization techniques.\n\n## \ud83d\udee0\ufe0f Development & Contributing\n\nThe project includes comprehensive development tools and documentation:\n\n- **Debug Tools**: Pricing analysis and debugging scripts in `scripts/` directory\n- **Performance Testing**: Benchmarking tools in `benchmarks/` directory\n- **Development Setup**: Complete setup instructions and guidelines\n\n> \ud83d\udcd6 **Development Documentation**:\n>\n> - [CONTRIBUTING.md](CONTRIBUTING.md) - Contribution guidelines and development setup\n> - [docs/BENCHMARKING.md](docs/BENCHMARKING.md) - Performance testing and optimization\n> - [docs/PUBLISHING.md](docs/PUBLISHING.md) - PyPI publishing workflow\n> - [SECURITY.md](SECURITY.md) - Security policy and vulnerability reporting\n\n## \ud83d\udce6 Publishing to PyPI\n\nFor maintainers: To publish this package to PyPI, see the detailed publishing guide in [docs/PUBLISHING.md](docs/PUBLISHING.md) with complete workflows, testing procedures, and troubleshooting tips.\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on development setup, code standards, and contribution workflows.\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## \ud83d\ude4f Acknowledgments\n\n- Built with [Rich](https://github.com/Textualize/rich) for beautiful terminal UI\n- Powered by [boto3](https://github.com/boto/boto3) for AWS integration\n- Inspired by modern CLI tools like `eks-node-viewer`\n- **AI Development Partner**: Claude Sonnet 4 for collaborative coding and problem-solving\n- [@sachincool](https://github.com/sachincool) for the cool logo \ud83e\udee1\n- [@kutumbtech](https://github.com/kutumbtech) for everything \ud83d\ude4f\n\n---\n\n## Happy RDS monitoring! \ud83c\udf89\n\n_Your terminal is now your RDS command center!_\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Your terminal companion for monitoring Amazon RDS instances with real-time data, pricing, and interactive insights!",
    "version": "0.1.22",
    "project_urls": {
        "Bug Reports": "https://github.com/k4kratik/smart-rds-viewer/issues",
        "Documentation": "https://github.com/k4kratik/smart-rds-viewer#readme",
        "Homepage": "https://github.com/k4kratik/smart-rds-viewer",
        "Repository": "https://github.com/k4kratik/smart-rds-viewer"
    },
    "split_keywords": [
        "aws",
        " rds",
        " monitoring",
        " cloudwatch",
        " pricing",
        " terminal",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a1589f4010c44d1d094f0a251145547b13f0273371678e4cdcb93e61894d5f76",
                "md5": "afd0bcf13cb5f8293e9d533411a9dfe6",
                "sha256": "8ce3d2e66e6ba4e0bf452e97ccd134b94efc1d830d04df606e1875728601a4bd"
            },
            "downloads": -1,
            "filename": "smart_rds_viewer-0.1.22-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "afd0bcf13cb5f8293e9d533411a9dfe6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 42119,
            "upload_time": "2025-08-11T03:02:30",
            "upload_time_iso_8601": "2025-08-11T03:02:30.891799Z",
            "url": "https://files.pythonhosted.org/packages/a1/58/9f4010c44d1d094f0a251145547b13f0273371678e4cdcb93e61894d5f76/smart_rds_viewer-0.1.22-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0fec698055c6d88c679829f419f51d48daf4129a77cd3a7c2c536baeb067ae77",
                "md5": "666ad1a57297392677cc63e0e749be86",
                "sha256": "e2929c5eabe0ba9f1b0645ef248b1aaaac31606bccac760f76410d1c41ea7994"
            },
            "downloads": -1,
            "filename": "smart_rds_viewer-0.1.22.tar.gz",
            "has_sig": false,
            "md5_digest": "666ad1a57297392677cc63e0e749be86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 44651,
            "upload_time": "2025-08-11T03:02:32",
            "upload_time_iso_8601": "2025-08-11T03:02:32.364986Z",
            "url": "https://files.pythonhosted.org/packages/0f/ec/698055c6d88c679829f419f51d48daf4129a77cd3a7c2c536baeb067ae77/smart_rds_viewer-0.1.22.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-11 03:02:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "k4kratik",
    "github_project": "smart-rds-viewer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "boto3",
            "specs": []
        },
        {
            "name": "rich",
            "specs": []
        },
        {
            "name": "typer",
            "specs": []
        },
        {
            "name": "readchar",
            "specs": []
        },
        {
            "name": "pytz",
            "specs": []
        }
    ],
    "lcname": "smart-rds-viewer"
}
        
Elapsed time: 1.86412s