Skip to main content

az-scout plugin for comparing Azure costs between regions using Cost Management exports

Project description

az-scout-plugin-compare-cost-between-regions

An az-scout plugin for comparing Azure costs between regions using Enterprise Agreement billing exports.

What it does

Upload your Detail Enrollment CSV (usage details) and optionally your PriceSheet ZIP to:

  1. Analyse usage — Aggregate monthly costs per SKU for a selected MeterRegion, with a billing summary breakdown by service category
  2. Compare regions — Upload your EA PriceSheet ZIP and select a target region to estimate what the same workload would cost in a different Azure region

3-step workflow

Step Name Description
1 Prerequisites Select billing account type (EA or MCA) and follow download instructions for the required files
2 Usage Analysis Upload the Detail Enrollment CSV, select a source MeterRegion, view aggregated SKU costs and billing summary
3 Region Comparison Upload the PriceSheet ZIP, select a target region, compare costs side-by-side

Key features

  • 2-step SKU matching — MeterId → source PriceSheet row → region-agnostic product key → target region lookup
  • UoM normalization — Handles different UnitOfMeasure formats across regions (e.g. 1 TB/Month vs 100 GB/Month)
  • BasePrice disambiguation — Correctly matches pricing tiers when the same product has multiple SkuIDs
  • ARM ↔ MeterRegion mapping — 65+ region mappings between ARM slugs and PriceSheet abbreviations
  • Sortable tables — via simpleDatatables with numeric column sorting
  • CSV export — Download usage analysis and comparison results
  • EA/MCA documentation — Step-by-step download instructions aligned with Microsoft documentation

Supported billing account types

  • Enterprise Agreement (EA) — fully supported
  • MCA / MPA — download instructions shown, but analysis not yet validated

Setup

# Install the plugin (editable mode for development)
cd az-scout-plugin-compare-cost-between-regions
uv sync --group dev
uv pip install -e .

# Start az-scout — the plugin is auto-discovered
az-scout

Structure

src/az_scout_compare_cost_between_regions/
├── __init__.py      # Plugin class + module-level instance
├── _log.py          # Logger helper
├── pricing.py       # PriceSheet matching, UoM normalization, cost comparison engine
├── routes.py        # FastAPI routes: /compare-pricesheet, /region-mapping
├── tools.py         # MCP tool: compare_cost_between_regions
└── static/
    ├── css/         # Plugin styles (dark/light theme support)
    ├── html/        # HTML fragment (3-step wizard)
    └── js/          # Tab UI logic, CSV parsing, aggregation

API routes

Method Path Description
POST /compare-pricesheet Upload PriceSheet ZIP + items JSON, returns comparison results
GET /region-mapping Returns ARM ↔ MeterRegion mapping dictionaries

MCP tool

  • compare_cost_between_regions(file_path, meter_region, source_arm_region, target_arm_region) — Analyse a Detail Enrollment CSV and return a comparison structure

Quality checks

uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
uv run pytest

CI/CD

  • CI (.github/workflows/ci.yml): Runs lint and tests on push/PR to main
  • Publish (.github/workflows/publish.yml): Triggered on version tags (v*), builds package, creates GitHub Release, publishes to PyPI via trusted publishing (OIDC)

Versioning

Version is derived from git tags via hatch-vcs. Tags follow CalVer: v2026.4.0, v2026.4.1, etc.

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

Built Distribution

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

File details

Details for the file az_scout_plugin_compare_cost_between_regions-2026.4.0.tar.gz.

File metadata

File hashes

Hashes for az_scout_plugin_compare_cost_between_regions-2026.4.0.tar.gz
Algorithm Hash digest
SHA256 5fafb1caf37dc9c690d061c0d071b4e61399b3765f31b374768533ef49b18f57
MD5 63618c25fbc1f63e7da36d873e2c2530
BLAKE2b-256 83bd8a0aa5fe6ebc7dfcb0c12b8718fadb5aed054e8412485bde96d2c103c822

See more details on using hashes here.

Provenance

The following attestation bundles were made for az_scout_plugin_compare_cost_between_regions-2026.4.0.tar.gz:

Publisher: publish.yml on az-scout/az-scout-plugin-compare-cost-between-regions

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file az_scout_plugin_compare_cost_between_regions-2026.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for az_scout_plugin_compare_cost_between_regions-2026.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e92b5a338f3651bdc3e49ce8bde0eb00b6708c5015e9a97b34cb4701fa74b083
MD5 28cdd867c9623139e0357468574eb54f
BLAKE2b-256 a47f92ee2fb7d5fdc3d53fcb45a73061bee399edeeaddbd4f3e57fc34faa2902

See more details on using hashes here.

Provenance

The following attestation bundles were made for az_scout_plugin_compare_cost_between_regions-2026.4.0-py3-none-any.whl:

Publisher: publish.yml on az-scout/az-scout-plugin-compare-cost-between-regions

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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