Giter Site home page Giter Site logo

cdchapman / ec2instancespricing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erans/ec2instancespricing

0.0 2.0 0.0 95 KB

Quick and dirty Python API and CLI to get EC2 instance pricing for On-Demand and Reserved Instances

Python 100.00%

ec2instancespricing's Introduction

ec2instancespricing.py

Written by Eran Sandler (@erans)
http://eran.sandler.co.il
http://forecastcloudy.net (@forecastcloudy)

ec2instancespricing.py is a quick & dirty library and a command line interface (CLI) to get a list of all Amazon Web Services EC2 instances pricing including On-Demand and Reserved instances (in all utilization levels).

The data is based on a set of JSON files used in the EC2 page (http://aws.amazon.com/ec2). You can get a list of all available JSON files in this blog post: http://forecastcloudy.net/2012/04/02/amazon-web-services-aws-ec2-pricing-data/

The original JSON files as published by Amazon don't contain the same values used throughout the EC2 API. This library/cli maps the values in the JSON files to their corresponding values used throughout the EC2 API. Such values include region names, instance type, etc.

Data can be filtered by region, instance_type and os_type.

Importing this file will allow you to use two functions: get_ec2_ondemand_instances_prices - to get the pricing of On-Demand instances get_ec2_reserved_instaces_prices - to get the pricing of reserved instances (in all utilization levels)

Running this file will activate its CLI interface in which you can get output to your console in a CSV, JSON and table formats (default is table).

To run the command line interface, you need to install:
argparse - if you are running Python < 2.7
prettytable - to get a nice table output to your console

Both of these libraries can be installed using the 'pip install' command.

ec2instancespricing's People

Contributors

cdchapman avatar erans avatar michaelhood avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.