A Python library for working with the AWS (China) Price List API.
Features:
- Simple boto3-like interface
- Service-specific helpers (only EC2 and RDS thus far)
- Local caching support
This library is modified based on https://github.com/lyft/awspricing.
$ python setup.py biuld
$ python setup.py install
import awscnpricing
ec2_offer = awscnpricing.offer('AmazonEC2')
ec2_offer.search_skus(
instance_type='c4.large',
location='China (Beijing)',
operating_system='Linux',
)
ec2_offer.reserved_hourly(
'r5.24xlarge',
operating_system='Linux',
lease_contract_length='1yr',
offering_class='standard',
purchase_option='All Upfront',
region='cn-north-1'
)
ec2_offer.reserved_upfront(
'r5.24xlarge',
operating_system='Linux',
lease_contract_length='1yr',
offering_class='standard',
purchase_option='All Upfront',
region='cn-north-1'
)