Share and Money Management  0.16
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
smm.quote.yahoo.YahooWebFetchPlugin Class Reference

Share data tracker querying Yahoo finance data. More...

Inheritance diagram for smm.quote.yahoo.YahooWebFetchPlugin:

Public Member Functions

def __init__
def getCurrent
 Obtain information from the data provider.

Public Attributes

 REC_WKN
 Complex pattern to extract WKN and ISIN.

Static Public Attributes

list decimal_properties
 Decimal values.
string name = u'Yahoo Finance Web'
 Name of the data source.
int interface_version = 2
 Version number of the interface to access and convert the data.
string logger_name = 'smm.quote.yahooweb'
 Name of the instance logger.
int provider_id = 500
 Unique provider ID.
string provider_url = u"http://de.finance.yahoo.com/q?s=%(isin)s"
 URL to query the data.
string dsep = u','
 Decimal separator for converting strings to decimal values.
string tsep = u'.'
 Thousands separator for converting strings to decimal values.

Detailed Description

Share data tracker querying Yahoo finance data.

This tracker uses the Yahoo web portal

Constructor & Destructor Documentation

def smm.quote.yahoo.YahooWebFetchPlugin.__init__ (   self)

Member Function Documentation

def smm.quote.yahoo.YahooWebFetchPlugin.getCurrent (   self,
  request 
)

Obtain information from the data provider.

Parameters
selfThe object instance itself
requestSee example
Example:
>>> import pprint
>>> pprint.pprint(request)
{u'DE0005003404': {'exchange.symbol': u'DE',
'share.isin': u'DE0005003404',
'share.symbol': u'ADS',
'share.wkn': u'500340'}}
>>> result = provider.getCurrent(request)
>>> pprint.pprint(result)
{u'DE0005003404': {'currency.sign': u'\u20ac',
'exchange.symbol': u'DE',
'quote.ask': Decimal("42.06"),
'quote.bid': Decimal("42.02"),
'quote.close': Decimal("42.06"),
'quote.datetime': datetime.datetime(2010, 5, 18, 17, 35),
'quote.high': Decimal("42.54"),
'quote.last': Decimal("42.06"),
'quote.low': Decimal("41.95"),
'quote.nchange': Decimal("0.35"),
'quote.open': Decimal("42.10"),
'quote.pchange': Decimal("0.84"),
'quote.price': Decimal("42.06"),
'quote.volume': Decimal("994121"),
'share.isin': u'DE0005003404',
'share.wkn': u'500340',
'source.id': 500,
'source.name': u'Yahoo Finance Web',
'success': True}}

References smm.quote.base.FetchPluginBase._getName(), smm.quote.base.FetchPluginBase.attr2decimal(), smm.quote.yahoo.YahooCSVFetchPlugin.decimal_properties, smm.quote.yahoo.YahooWebFetchPlugin.decimal_properties, smm.quote.base.FetchPluginBase.getHTML(), smm.quote.base.FetchPluginBase.getSoup(), smm.quote.base.FetchPluginBase.getStringFromHtml(), smm.quote.base.FetchPluginBase.initShareStruct(), smm.quote.raiffeisen.RaiffeisenFetchPlugin.provider_url, smm.quote.yahoo.YahooCSVFetchPlugin.provider_url, smm.quote.yahoo.YahooWebFetchPlugin.provider_url, smm.quote.base.FetchPluginBase.timestamp2datetime(), and smm.quote.base.toUnicode().

Here is the call graph for this function:

Member Data Documentation

list smm.quote.yahoo.YahooWebFetchPlugin.decimal_properties
static
Initial value:
['quote.ask', 'quote.bid', 'quote.close', 'quote.high', 'quote.last', 'quote.low',
'quote.nchange', 'quote.open', 'quote.pchange', 'quote.price', 'quote.volume']

Decimal values.

Those returned values will be converted into decimal.Decimal values

Note
Convert only valued needed by SMM.
See Also
yahoo2smm

Referenced by smm.quote.yahoo.YahooWebFetchPlugin.getCurrent().

string smm.quote.yahoo.YahooWebFetchPlugin.dsep = u','
static

Decimal separator for converting strings to decimal values.

See Also
attr2decimal()
tsep
int smm.quote.yahoo.YahooWebFetchPlugin.interface_version = 2
static

Version number of the interface to access and convert the data.

string smm.quote.yahoo.YahooWebFetchPlugin.logger_name = 'smm.quote.yahooweb'
static

Name of the instance logger.

string smm.quote.yahoo.YahooWebFetchPlugin.name = u'Yahoo Finance Web'
static

Name of the data source.

int smm.quote.yahoo.YahooWebFetchPlugin.provider_id = 500
static

Unique provider ID.

string smm.quote.yahoo.YahooWebFetchPlugin.provider_url = u"http://de.finance.yahoo.com/q?s=%(isin)s"
static

URL to query the data.

Referenced by smm.quote.yahoo.YahooWebFetchPlugin.getCurrent().

smm.quote.yahoo.YahooWebFetchPlugin.REC_WKN

Complex pattern to extract WKN and ISIN.

string smm.quote.yahoo.YahooWebFetchPlugin.tsep = u'.'
static

Thousands separator for converting strings to decimal values.

See Also
attr2decimal()
dsep

The documentation for this class was generated from the following file: