Skip to main content

az-scout-plugin-fabric-price

An az-scout plugin that surfaces Microsoft Fabric capacity pricing — PAYG, 1-Year RI, and 3-Year RI — directly inside the az-scout UI, REST API, and MCP server.

Data is sourced from the az-scout-bdd-api pricing database and enriched with per-SKU costs using the Fabric CU (Capacity Unit) mapping.

Features

  • UI tab — interactive pricing table with region/currency selectors, per-SKU hourly & monthly costs, savings percentages, and per-CU-hour summary cards
  • 3 REST endpoints — capacities list, latest prices, and price time series
  • 3 MCP tools — fabric_capacities, fabric_prices_latest, fabric_price_series
  • Dark/light theme support via CSS custom properties
  • In-memory TTL cache (configurable via FABRIC_PRICE_CACHE_TTL env var, default 300 s)

Prerequisites

Installation

uv pip install -e .     # development
# or
uv pip install az-scout-plugin-fabric-price  # from PyPI

The plugin is auto-discovered at startup — no extra configuration needed.

Configuration

This plugin reuses the BDD-SKU plugin's API URL. Set it via any of:

  1. BDD-SKU Settings UI — PUT /plugins/bdd-sku/settings
  2. Environment variable — BDD_SKU_API_URL
  3. TOML config — ~/.config/az-scout/bdd-sku.toml → [api] base_url = "…"

Cache TTL can be overridden:

export FABRIC_PRICE_CACHE_TTL=600  # seconds

REST API

All endpoints are mounted at /plugins/fabric-price/.

GET /v1/fabric/capacities

Static list of Fabric SKUs and CU counts.

curl http://localhost:5001/plugins/fabric-price/v1/fabric/capacities

GET /v1/fabric/prices/latest

Latest per-CU-hour and per-SKU pricing for a region.

Parameter Required Default Description
region yes — Azure region name
currency no USD ISO 4217 currency code
curl "http://localhost:5001/plugins/fabric-price/v1/fabric/prices/latest?region=eastus&currency=EUR"

GET /v1/fabric/prices/series

Price time series for a specific SKU.

Parameter Required Default Description
region yes — Azure region name
sku yes — Fabric SKU (F2, F4, … F2048)
model no PAYG Pricing model: PAYG, RI_1Y, RI_3Y
currency no USD ISO 4217 currency code
from no — Start date (ISO 8601)
to no — End date (ISO 8601)
bucket no day Time bucket: day, week, month
curl "http://localhost:5001/plugins/fabric-price/v1/fabric/prices/series?region=eastus&sku=F64&bucket=week"

MCP tools

Tool Parameters Description
fabric_capacities — List all Fabric SKUs and their CU counts
fabric_prices_latest region, currency? Latest pricing (per-CU-hour + per-SKU)
fabric_price_series region, sku, model?, currency?, from_dt?, to_dt?, bucket? Price time series for a SKU

Project structure

az-scout-plugin-fabric-price/
├── pyproject.toml
├── README.md
└── src/
    └── az_scout_fabric_price/
        ├── __init__.py          # FabricPricePlugin class
        ├── bdd_client.py        # HTTP client → bdd-api server
        ├── models.py            # SKU_CU_MAP, classify_model, extract_per_cu_hour
        ├── routes.py            # FastAPI endpoints (3 routes)
        ├── service.py           # Business logic + caching
        ├── tools.py             # MCP tool functions (3 tools)
        └── static/
            ├── css/fabric-price.css
            ├── html/fabric-price-tab.html
            └── js/fabric-price-tab.js
tests/
    ├── test_models.py
    ├── test_routes.py
    └── test_service.py

Development

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

Versioning

Version is derived from git tags via hatch-vcs. Tags follow CalVer: v2026.2.0.

How it works

  1. The plugin JS loads the HTML fragment into #plugin-tab-example.
  2. It watches #tenant-select and #region-select for changes.
  3. When both are set, it fetches subscriptions from /api/subscriptions.
  4. The user picks a subscription and clicks the button.
  5. The plugin calls GET /plugins/example/hello?subscription_name=…&tenant=…&region=….

Quality checks

The scaffold includes GitHub Actions workflows in .github/workflows/:

  • ci.yml — Runs lint (ruff + mypy) and tests (pytest) on Python 3.11–3.13, triggered on push/PR to main.
  • publish.yml — Builds, creates a GitHub Release, and publishes to PyPI via trusted publishing (OIDC). Triggered on version tags (v*). Requires a pypi environment configured in your repo settings with OIDC trusted publishing.

Run the same checks locally:

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

To publish a release:

git tag v2026.2.0
git push origin v2026.2.0

Copilot support

The .github/copilot-instructions.md file provides context to GitHub Copilot about the plugin structure, conventions, and az-scout plugin API. It helps Copilot generate code that follows the project patterns.

License

MIT

Disclaimer

This tool is not affiliated with Microsoft. All capacity, pricing, and latency information are indicative and not a guarantee of deployment success. Spot placement scores are probabilistic. Quota values and pricing are dynamic and may change between planning and actual deployment. Latency values are based on Microsoft published statistics and must be validated with in-tenant measurements.

Metadata

Release files for az-scout-plugin-fabric-price 2026.4.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for az-scout-plugin-fabric-price 2026.4.9
File Size Uploaded Provenance
az_scout_plugin_fabric_price-2026.4.9.tar.gz 136.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for az-scout-plugin-fabric-price 2026.4.9
File Interpreter ABI Platform
az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl Python 3 none any Details

Total release size: 158.5 kB

Release files / az_scout_plugin_fabric_price-2026.4.9.tar.gz

Download URL az_scout_plugin_fabric_price-2026.4.9.tar.gz
Size 136.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b67b798833e718e94e824edfdafd8aff13823430dfd9567ae7955f4c9b00488b
BLAKE2b-256 checksum
How to use checksums
17706212016d4d5c14ea13dafd2dcbe7445cfefe4a4f1069653bff0cdd4b46af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

Release files / az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl

Download URL az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
804f49ae62fc5ebe1b39c78c3077e00c3f75d74c4ade0501485859ba1bea0dea
BLAKE2b-256 checksum
How to use checksums
4ca49260c3fbb940af5fb371baa80b432b06a6acaa25f3753a781c0dbe3dae85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

Security for az-scout-plugin-fabric-price 2026.4.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for az_scout_plugin_fabric_price-2026.4.9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2026.4.9 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page