aeso.eventlog — Alberta Interconnected Electric System (AIES) Log Access

Access to the Alberta Interconnected Electric System Event log. The raw log is accessible at <>.

class aeso.eventlog.LogEntry(datetime, description)

Class representing an entry in the Alberta Integrated Electric System Log. This object will iterate over its members returning self.dt, and self.description in succession.

New in version 0.6.

Example Usage::
>>> from aeso import eventlog
>>> from datetime import datetime
>>> dt = datetime(2010, 4, 22)
>>> e = eventlog.LogEntry(dt, 'Sample log entry')
>>> e.dt
datetime.datetime(2010, 4, 22, 0, 0)
>>> e.description
'Sample log entry'
>>> extracted_dt, extracted_desc = e
>>> str(extracted_dt)
'2010-04-22 00:00:00'
>>> str(extracted_desc)
'Sample log entry'

str property.


datetime.datetime property.


Yields (LogEntry, str) objects containing event datetime and description as extracted from file-like object f. As always with pyaeso, datetimes are UTC offset-aware and should be converted to localized datetimes before being displayed to the user.

New in version 0.6.

Example Usage::
>>> from aeso import eventlog
>>> from aeso import AB_TZ
>>> from datetime import datetime
>>> f = eventlog.urlopen()
>>> for utc_dt, msg in eventlog.parse_eventlog_file(f):
...     # Convert UTC to Alberta timezone before printing
...     ab_dt = AB_TZ.normalize(utc_dt.astimezone(AB_TZ))
...     assert type(ab_dt) == datetime
...     assert type(msg) == str # Event description
>>> f.close()

Returns an open file-object connected to AESO’s Alberta Interconnected Electric System (AIES) event log webservice.

Parameters:timeout – optional parameter specifying timeout in seconds for blocking operations like the connection attempt. If operation times out urllib2.URLError will be raised. ValueError will be raised in Python 2.4 and 2.5 if this parameter is set to anything but None.
Return type:file-like object.

New in version 0.6.

New in version 0.7: timeout parameter.

Previous topic

aeso.equilibrium — Market supply/demand equilibrium points

Next topic

aeso.mpp — Marginal pool prices

This Page