Inter-region latency statistics plugin for az-scout
Project description
az-scout-plugin-latency-stats
Inter-region latency statistics plugin for az-scout.
Features
- Latency dataset — static latency matrix based on Microsoft published statistics
- API endpoints —
POST /plugins/latency-stats/matrixfor pairwise latency matrices,GET /plugins/latency-stats/pairsto list all known pairs - MCP tool —
region_latency(source_region, target_region)returns indicative RTT between two Azure regions - UI tab — interactive D3.js force-directed graph where regions are nodes and edges show latency in ms
- URL hash routing —
#latencyselects the plugin tab
Setup
pip install az-scout-plugin-latency-stats
az-scout # plugin is auto-discovered
For development:
git clone https://github.com/lrivallain/az-scout-plugin-latency-stats
cd az-scout-plugin-latency-stats
uv sync --group dev
uv pip install -e .
az-scout # plugin is auto-discovered
Structure
az-scout-plugin-latency-stats/
├── .github/
│ ├── copilot-instructions.md # Copilot context for this plugin
│ └── workflows/
│ ├── ci.yml # CI pipeline (lint + test, Python 3.11–3.13)
│ └── publish.yml # Publish to PyPI on version tags
├── pyproject.toml
├── README.md
└── src/
└── az_scout_latency_stats/
├── __init__.py # Plugin class + module-level `plugin` instance
├── latency.py # Static latency dataset + public API
├── routes.py # FastAPI APIRouter (optional)
├── tools.py # MCP tool functions (optional)
└── static/
├── css/
│ └── latency.css # Plugin styles (auto-loaded via css_entry)
├── html/
│ └── latency-tab.html # HTML fragment (fetched by JS at runtime)
└── js/
└── latency-tab.js # Tab UI logic (auto-loaded via js_entry)
How it works
- The plugin JS loads the HTML fragment into
#plugin-tab-latency. - Regions are populated from the main app's
regionsglobal. - The user selects 2+ regions and clicks Show Latency Graph.
- The plugin calls
POST /plugins/latency-stats/matrixwith the selected regions. - A D3.js force-directed graph renders regions as nodes with RTT-labelled edges.
API
# Pairwise matrix
curl -X POST http://localhost:8080/plugins/latency-stats/matrix \
-H "Content-Type: application/json" \
-d '{"regions": ["francecentral", "westeurope", "eastus"]}'
# All known pairs
curl http://localhost:8080/plugins/latency-stats/pairs
MCP tool
region_latency(source_region="francecentral", target_region="westeurope")
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.
Data source
Latency values are approximate median round-trip times from the Azure Network Latency page. Always validate with in-tenant measurements.
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_latency_stats-2026.3.0.tar.gz.
File metadata
- Download URL: az_scout_plugin_latency_stats-2026.3.0.tar.gz
- Upload date:
- Size: 137.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db4f41afe3754aa38b8e30b80850c8bd1a25fe17379d2551c765415a8bd006b4
|
|
| MD5 |
a8cda63aed02a21524f83f5b2f95087d
|
|
| BLAKE2b-256 |
445e035b43f4e852bfd4e91809e57bb9e2c0920b5e94d755ffa59cca469cd0c8
|
Provenance
The following attestation bundles were made for az_scout_plugin_latency_stats-2026.3.0.tar.gz:
Publisher:
publish.yml on lrivallain/az-scout-plugin-latency-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_latency_stats-2026.3.0.tar.gz -
Subject digest:
db4f41afe3754aa38b8e30b80850c8bd1a25fe17379d2551c765415a8bd006b4 - Sigstore transparency entry: 1011895619
- Sigstore integration time:
-
Permalink:
lrivallain/az-scout-plugin-latency-stats@b1ca96f6aaab81299eade7b4e0d459846bea0ff4 -
Branch / Tag:
refs/tags/v2026.3.0 - Owner: https://github.com/lrivallain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1ca96f6aaab81299eade7b4e0d459846bea0ff4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file az_scout_plugin_latency_stats-2026.3.0-py3-none-any.whl.
File metadata
- Download URL: az_scout_plugin_latency_stats-2026.3.0-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9a46a11eb2b941053a9207fdcaf117fbea523610256cb41c7563c8632472a17
|
|
| MD5 |
8d5e465032ee2b31a77736af96c8b8a6
|
|
| BLAKE2b-256 |
bbb579e96969ba321f7b0f6a3cf7b95fc577003304c3445420adcd6f901d8efa
|
Provenance
The following attestation bundles were made for az_scout_plugin_latency_stats-2026.3.0-py3-none-any.whl:
Publisher:
publish.yml on lrivallain/az-scout-plugin-latency-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_latency_stats-2026.3.0-py3-none-any.whl -
Subject digest:
d9a46a11eb2b941053a9207fdcaf117fbea523610256cb41c7563c8632472a17 - Sigstore transparency entry: 1011895687
- Sigstore integration time:
-
Permalink:
lrivallain/az-scout-plugin-latency-stats@b1ca96f6aaab81299eade7b4e0d459846bea0ff4 -
Branch / Tag:
refs/tags/v2026.3.0 - Owner: https://github.com/lrivallain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1ca96f6aaab81299eade7b4e0d459846bea0ff4 -
Trigger Event:
push
-
Statement type: