Helpers to access AESO’s asset list at <http://ets.aeso.ca/ets_web/ip/Market/Reports/AssetListReportServlet>.
Represents an asset be it an AssetType.SINK and AssetType.SOURCE
New in version 0.6.
str property.
str property.
str property.
str property.
AssetStatus property.
Asset state enumeration.
New in version 0.6.
Converts some simple strings to enumeration values.
Asset type enumeration.
New in version 0.6.
Converts some simple strings to enumeration values.
Downloads asset list report and writes it to file-object f.
Parameters: |
|
---|
New in version 0.6.
New in version 0.7: timeout parameter.
Usage example:
>>> try:
... from io import BytesIO
... except ImportError:
... from StringIO import StringIO as BytesIO
>>> # 3rd Party Libraries
>>> from aeso import asset
>>>
>>> f = BytesIO()
>>> try:
... asset.dump_asset_list(f)
... finally:
... f.close()
Yields Asset objects extracted from the open file-object f.
New in version 0.6.
Usage example:
>>> # 3rd Party Libraries
>>> from aeso import asset
>>>
>>>
>>> f = asset.urlopen_asset_list()
>>> assets = list(asset.parse_asset_list_file(f))
>>> f.close()
Returns a file-like object containing data returned by the ETS asset list 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.
Usage example:
>>> # 3rd Party Libraries
>>> from aeso import asset
>>>
>>> f = asset.urlopen_asset_list()
>>> text = f.read()
>>> f.close()
Note
The raw ETS asset list report can be accessed at <http://ets.aeso.ca/ets_web/ip/Market/Reports/AssetListReportServlet>.