pywind.roc

pywind.roc.eroc

http://www.epowerauctions.co.uk/images/eROC_100.gif
class pywind.roc.eroc.EROCPrices[source]

Bases: object

The EROCPrices class provides access to the auction data from the eRIC website. Once created the get_prices() is called to get the latest information from their website and parse the results into period prices.

Once parsed period information can be accessed by using the class object as a dict, i.e. eroc[200701] would return the average proce for auction(s) held in Jan 2007.

>>> from pywind.roc.eroc import EROCPrices
>>> eroc = EROCPrices()
>>> eroc.get_prices()
True
>>> eroc[200701]
46.17
URL = 'http://www.epowerauctions.co.uk/erocrecord.htm'
get_prices()[source]

Get the recent prices.

Returns:True or False
Return type:bool
prices()[source]

Generator to return the calculated price data.

Returns:Tuple of period, price
Return type:tuple
process_file(local_file)[source]

Process a local HTML file.

Parameters:local_file – Filename to be parsed.
Returns:True or False
Return type:bool
rows()[source]

Generator to return the full auction data as rows.

Returns:Dict of price data
Return type:dict
pywind.roc.eroc.parse_date_string(dtstr)[source]