azure-radar
A CLI tool to inventory, diagram, and run operations on Azure services using Azure CLI, mirroring gcp-radar for GCP.
Requirements
- Azure CLI: Install from https://docs.microsoft.com/cli/azure/install-azure-cli
- Python 3.8+
Installation
pip install azure-radar
Authentication
This tool uses Azure CLI for authentication, supporting various methods including SSO.
For SSO-enabled accounts:
-
Install Azure CLI (if not already installed):
brew install azure-cli # macOS # or use appropriate installer for your OS
-
Authenticate with SSO:
az login --use-device-code # or if browser available az login
-
Set subscription (if you have multiple):
az account set --subscription <subscription-id> # or export it export AZURE_SUBSCRIPTION_ID=<your-subscription-id>
Usage
# Generate CSV inventory of all Azure resources
azure-radar inventory
# Generate draw.io diagram of services
azure-radar diagram
# Run both inventory and diagram
azure-radar run
# Pull the last 30 days of cost data to CSV
azure-radar billing
# ...or fold billing into the full run
azure-radar run --billing
Billing
azure-radar billing queries the Azure Cost Management API (via az rest) and writes
daily cost rows broken down by service and resource.
# Last 30 days (default)
azure-radar billing
# Last 60 or 90 days
azure-radar billing --days 60
azure-radar billing --days 90
# Custom output file
azure-radar billing --days 90 --output q3-spend.csv
# Amortized instead of actual cost (spreads reservation/savings-plan purchases)
azure-radar billing --cost-type AmortizedCost
# Narrow to specific services and/or resource groups (both repeatable)
azure-radar billing --service "Virtual Machines" --service "Storage" --resource-group rg-prod
# Same options are available on the full run
azure-radar run --billing --days 90 --billing-output spend.csv
| Option | Default | Description |
|---|---|---|
--days, -d |
30 |
Lookback window — must be 30, 60, or 90 |
--output, -o |
azure_billing.csv |
CSV output file |
--cost-type |
ActualCost |
ActualCost or AmortizedCost |
--service |
(all) | Filter to a service name; repeat for several |
--resource-group |
(all) | Filter to a resource group; repeat for several |
The CSV contains one row per day / service / resource:
| Column | Description |
|---|---|
Date |
Usage day (YYYY-MM-DD) |
ServiceName |
Cost Management service name |
ServiceType |
Normalized service name, matching azure_inventory.csv |
ResourceName |
Resource name parsed from the resource ID |
ResourceGroup |
Resource group parsed from the resource ID |
ResourceType |
ARM type, e.g. Microsoft.Compute/virtualMachines |
ResourceId |
Full ARM resource ID |
Cost |
Cost for that day |
Currency |
Billing currency |
SubscriptionId |
Subscription the cost belongs to |
Because ServiceType is normalized the same way as the inventory output, the two CSVs
can be joined on ServiceType (or on resource name/group) for cost-per-service reporting.
Permissions: reading cost data requires the Cost Management Reader role (or higher) on the subscription, which is separate from the reader role used by
inventory.
Output Files
azure_inventory.csv- CSV file with all Azure resourcesazure_diagram.drawio- Draw.io diagram of service distributionazure_billing.csv- CSV file with daily costs per service and resource (withbilling/--billing)
Supported Azure Services
This tool currently supports the following Azure service categories for inventory and diagram generation:
- Virtual Machines
- Azure SQL
- Azure Functions
- AKS
- Storage Accounts
- Container Apps
- Cosmos DB
- Service Bus
- Azure ML
Cloud Service Mapping (Azure → AWS → GCP → OCI)
| Azure | AWS | GCP | OCI |
|---|---|---|---|
| Virtual Machines | EC2 | Compute Engine | OCI Compute |
| Azure SQL | RDS | Cloud SQL | Autonomous Database |
| Azure Functions | Lambda | Cloud Functions | OCI Functions |
| AKS | EKS | GKE | Container Engine for Kubernetes |
| Storage Accounts | S3 | Cloud Storage | Object Storage |
| Container Apps | App Runner | Cloud Run | Container Instances |
| Cosmos DB | DynamoDB | Firestore | NoSQL Database |
| Service Bus | SNS/SQS | Pub/Sub | Streaming Service |
| Azure ML | SageMaker | Vertex AI | Data Science |
Related PyPI packages
This project is part of a family of "radars" tools available on PyPI. Two related packages you may find useful:
aws-radar— available on PyPI (example versions: 0.1.1, 0.1.0)gcp-radar— available on PyPI (example versions: 0.1.9, 0.1.3, 0.1.1, 0.1.0)
Install them with pip:
pip install aws-radar
pip install gcp-radar
These packages follow a similar CLI shape (inventory, diagram, run) for their respective clouds.
Metadata
Release files for azure-radar 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| azure_radar-1.2.1.tar.gz | 12.1 kB | Without provenance | Details for azure_radar-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| azure_radar-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for azure_radar-1.2.1-py3-none-any.whl |
Total release size: 24.3 kB
Release files / azure_radar-1.2.1.tar.gz
| Download URL | azure_radar-1.2.1.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ca71b0f96192c15dd1f0e921a141ddb215dd762174425ca2fbaaf232c4e6494
|
|
BLAKE2b-256 checksum How to use checksums |
e26c6dfb4a1f2a9eac646978c336e1a48b487070867194cd4509fefe8444194b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / azure_radar-1.2.1-py3-none-any.whl
| Download URL | azure_radar-1.2.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b67efa30b998c8a5e6628b43cd3dc789a3732f412ccc7835a20f169acdc87baa
|
|
BLAKE2b-256 checksum How to use checksums |
e7fbf222dbabd6cf59bc34c5ba2c48ab064b56c5611049932aec249f5f81ea89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for azure-radar 1.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.