Simple main routine for awspricingfull module.
Call the class corresponding to your needs (EC2Prices(), RDSPrices(), etc.), and use any method with parameters needed. See the awspricingfull documentation for reference.
In a nutshell: To save CSV use save_csv method for instance of any of the functional classes (EC2Prices() - EC2, RDSPrices() - RDS, ELCPrices() - ElastiCache, RSPrices() - Redshift). With save_csv use “reserved” or “ondemand” as first parameter, your path as second (home dir by default) and file name as third (conventional default). Also, to save prices for all the products use AllAWSPrices() class and same save_csv method with small difference - you can set the first parameter to “all” which will return all the pricing (reserved and on-demand for all the services).
Method print_table is available for EC2Prices(), RDSPrices(), ELCPrices(), RSPrices(). It outputs the pricing in a table format to console. Prettytable library is required. Method takes only one parameter: “reserved” or “ondemand”. Not available for AllAWSPrices().
Method print_json is available for all classes. It returns the pricing in a JSON format and does not output it to console. Method takes only one parameter: “reserved” or “ondemand” and additional “all” for AllAWSPrices().
Created: Mar 26, 2015
Updated: June 19, 2015
@author: Ilia Semenov
@version: 2.0