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__ (self)
 
def getCurrent (self, request)
 Obtain information from the data provider. More...
 

Public Attributes

 REC_WKN
 Complex pattern to extract WKN and ISIN. More...
 

Static Public Attributes

list decimal_properties
 Decimal values. More...
 
string name = u'Yahoo Finance Web'
 Name of the data source. More...
 
int interface_version = 2
 Version number of the interface to access and convert the data. More...
 
string logger_name = 'smm.quote.yahooweb'
 Name of the instance logger. More...
 
int provider_id = 500
 Unique provider ID. More...
 
string provider_url = u"http://de.finance.yahoo.com/q?s=%(isin)s"
 URL to query the data. More...
 
string dsep = u','
 Decimal separator for converting strings to decimal values. More...
 
string tsep = u'.'
 Thousands separator for converting strings to decimal values. More...
 
- Static Public Attributes inherited from smm.quote.base.FetchPluginBase
list properties = []
 List of supported properties. More...
 
bool check_robotfile = True
 Check and respect the robots.txt file. More...
 
string encoding = 'ascii'
 Default encoding of all returned strings. More...
 
int interface_version = 2
 Version number of the interface to access and convert the data. More...
 
string logger_name = 'smm.quote.base'
 Name of the instance logger. More...
 
string name = 'Override in derivated class!'
 Name of the data source. More...
 
 provider_id = None
 Unique provider ID. More...
 
string dsep = u','
 Decimal separator for converting strings to decimal values. More...
 
 tsep = None
 Thousands separator for converting strings to decimal values. More...
 
int max_retries = 3
 Number of retries for temporary connection errors. More...
 
string user_agent = 'Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6'
 Define a own user agent string. More...
 

Detailed Description

Share data tracker querying Yahoo finance data.

This tracker uses the Yahoo web portal

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ getCurrent()

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.yahoo.YahooCSVFetchPlugin.decimal_properties, smm.quote.yahoo.YahooWebFetchPlugin.decimal_properties, smm.quote.raiffeisen.RaiffeisenFetchPlugin.provider_url, smm.quote.yahoo.YahooCSVFetchPlugin.provider_url, smm.quote.yahoo.YahooWebFetchPlugin.provider_url, smm.quote.yahoo.YahooWebFetchPlugin.REC_WKN, and smm.quote.base.toUnicode().

Here is the call graph for this function:

Member Data Documentation

◆ decimal_properties

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().

◆ dsep

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

Decimal separator for converting strings to decimal values.

See also
attr2decimal()
tsep

◆ interface_version

int smm.quote.yahoo.YahooWebFetchPlugin.interface_version = 2
static

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

◆ logger_name

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

Name of the instance logger.

◆ name

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

Name of the data source.

◆ provider_id

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

Unique provider ID.

◆ provider_url

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().

◆ REC_WKN

smm.quote.yahoo.YahooWebFetchPlugin.REC_WKN

Complex pattern to extract WKN and ISIN.

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

◆ tsep

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: