Share via

Can Python Azure SDK Library factor in dev/test subscription pricing?

Prem Jha 140 Reputation points
2025-11-26T08:40:41.1233333+00:00

I am using BASE_URL = "https://prices.azure.com/api/retail/prices?" for the Pay as you go subscription type but I now want to add support for the Dev/test subscription type as well for pricing and cost estimation as well.

I did not found anything specific to Dev/test Subscription type for the pricing related SDK/API endpoints. So, I just want to know if there is anything that is available/present at SDK level for Dev/test subscription type.

Also, I also want to leverage the Azure python SDK library function call to take into account price reductions for reserved instances or azure hybrid benefits as well?

Please share your valuable insights.

Cost Management
Cost Management

A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Vinodh247-1375 43,181 Reputation points Volunteer Moderator
    2026-01-04T01:59:58.6733333+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    no, the Azure Retail Prices API and the Azure Python SDK do not natively support subscription-type aware pricing such as Dev/Test, nor do they automatically apply Reserved Instance or Hybrid Benefit discounts.

    more detail: https://prices.azure.com/api/retail/prices always returns list (retail) prices, primarily Pay-As-You-Go. Dev/Test pricing is not exposed as a separate flag, filter, or SKU in the API or any Azure SDK. Dev/Test discounts are enforced at billing time, not at the pricing catalog level. Similarly, Reserved Instances and Azure Hybrid Benefit are billing constructs, not price list variants. The SDK does not calculate these reductions for you. If you want accurate estimates, you must apply custom post-processing logic: detect Dev/Test–eligible services, apply known discount percentages, factor RI amortization, and adjust compute prices when AHB is enabled. For authoritative cost estimation, Azure Cost Management (Usage + Charges APIs) reflects actual billed amounts, but that is after consumption, not for upfront estimation.

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the reply was helpful. This will be benefitting other community members who face the same issue.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.