az-scout plugin for Microsoft Fabric capacity pricing
Project description
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_TTLenv var, default 300 s)
Prerequisites
- az-scout installed
- az-scout-bdd-sku plugin installed and configured with a valid API URL pointing to a running az-scout-bdd-api instance
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:
- BDD-SKU Settings UI —
PUT /plugins/bdd-sku/settings - Environment variable —
BDD_SKU_API_URL - 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¤cy=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
- The plugin JS loads the HTML fragment into
#plugin-tab-example. - It watches
#tenant-selectand#region-selectfor changes. - When both are set, it fetches subscriptions from
/api/subscriptions. - The user picks a subscription and clicks the button.
- The plugin calls
GET /plugins/example/hello?subscription_name=…&tenant=…®ion=….
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 tomain.publish.yml— Builds, creates a GitHub Release, and publishes to PyPI via trusted publishing (OIDC). Triggered on version tags (v*). Requires apypienvironment 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
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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file az_scout_plugin_fabric_price-2026.4.9.tar.gz.
File metadata
- Download URL: az_scout_plugin_fabric_price-2026.4.9.tar.gz
- Upload date:
- Size: 136.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b67b798833e718e94e824edfdafd8aff13823430dfd9567ae7955f4c9b00488b
|
|
| MD5 |
2561006148bbf0f629aa5689d60baeca
|
|
| BLAKE2b-256 |
17706212016d4d5c14ea13dafd2dcbe7445cfefe4a4f1069653bff0cdd4b46af
|
Provenance
The following attestation bundles were made for az_scout_plugin_fabric_price-2026.4.9.tar.gz:
Publisher:
publish.yml on az-scout/az-scout-plugin-fabric-price
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_fabric_price-2026.4.9.tar.gz -
Subject digest:
b67b798833e718e94e824edfdafd8aff13823430dfd9567ae7955f4c9b00488b - Sigstore transparency entry: 1262657302
- Sigstore integration time:
-
Permalink:
az-scout/az-scout-plugin-fabric-price@a8403a6e1ad007000cc2d2396091b7c1eaa7f498 -
Branch / Tag:
refs/tags/v2026.04.09 - Owner: https://github.com/az-scout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a8403a6e1ad007000cc2d2396091b7c1eaa7f498 -
Trigger Event:
push
-
Statement type:
File details
Details for the file az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl.
File metadata
- Download URL: az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
804f49ae62fc5ebe1b39c78c3077e00c3f75d74c4ade0501485859ba1bea0dea
|
|
| MD5 |
afd20edd008500c4a322b688eedd741e
|
|
| BLAKE2b-256 |
4ca49260c3fbb940af5fb371baa80b432b06a6acaa25f3753a781c0dbe3dae85
|
Provenance
The following attestation bundles were made for az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl:
Publisher:
publish.yml on az-scout/az-scout-plugin-fabric-price
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_fabric_price-2026.4.9-py3-none-any.whl -
Subject digest:
804f49ae62fc5ebe1b39c78c3077e00c3f75d74c4ade0501485859ba1bea0dea - Sigstore transparency entry: 1262657305
- Sigstore integration time:
-
Permalink:
az-scout/az-scout-plugin-fabric-price@a8403a6e1ad007000cc2d2396091b7c1eaa7f498 -
Branch / Tag:
refs/tags/v2026.04.09 - Owner: https://github.com/az-scout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a8403a6e1ad007000cc2d2396091b7c1eaa7f498 -
Trigger Event:
push
-
Statement type: