Share and Money Management 0.18devel
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 = "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 = "http://de.finance.yahoo.com/q?s=%(isin)s"
 URL to query the data. More...
 
string dsep = ","
 Decimal separator for converting strings to decimal values. More...
 
string tsep = "."
 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...
 
bool active = True
 Set False to deactivate a plugin. 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 = ","
 Decimal separator for converting strings to decimal values. More...
 
 tsep = None
 Thousands separator for converting strings to decimal values. More...
 
 logger = None
 Instance logger. More...
 
int max_retries = 3
 Number of retries for temporary connection errors. More...
 
tuple user_agent
 Define an 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}}
Share data tracker querying Yahoo finance data.
Definition: yahoo.py:462

References smm.quote.yahoo.YahooCSVFetchPlugin.decimal_properties, smm.quote.yahoo.YahooWebFetchPlugin.decimal_properties, smm.quote.base.FetchPluginBase.logger, smm.quote.raiffeisen.RaiffeisenFetchPlugin.provider_url, smm.quote.yahoo.YahooCSVFetchPlugin.provider_url, smm.quote.yahoo.YahooWebFetchPlugin.provider_url, smm.quote.yahoo.YahooQueryFetchPlugin.provider_url, and smm.quote.yahoo.YahooWebFetchPlugin.REC_WKN.

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.YahooCSVFetchPlugin.getCurrent(), and smm.quote.yahoo.YahooWebFetchPlugin.getCurrent().

◆ dsep

string smm.quote.yahoo.YahooWebFetchPlugin.dsep = ","
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 = "Yahoo Finance Web"
static

◆ provider_id

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

Unique provider ID.

◆ provider_url

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

◆ 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 = "."
static

Thousands separator for converting strings to decimal values.

See also
attr2decimal()
dsep

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