🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

cloudprice

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudprice

A SDK for cloud compute pricing

0.0.3
Maintainers
1

cloud-compute-pricing

image image image image

Examples

For more examples see the examples directory with this repo.

Azure Virtual Machines

Currently for Azure VMs there is support for On Demand, Spot, Low Priority, and Reserved Instance pricing.

Using the default parameters will return the price for the Linux On Demand VM.

See example below on how to use the AzureVM module.

from cloudprice import AzureVM

# Get Azure VM Pricing
example_vm = AzureVM("US West", "Standard_E8_v3")

# Get Azure VM Pricing for On Demand Instance
example_vm_standard = example_vm.getPrice()
print(
    f"""
Product Name: {example_vm_standard.product_name}
Meter Name: {example_vm_standard.meter_name}
Location: {example_vm_standard.location}
Effective Date: {example_vm_standard.effective_start_date}
Unit Price: {example_vm_standard.unit_price}
"""
)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts