2022-07-15 12:40 UTC

CurrencyConverter

NAME
    CurrencyConverter

CLASSES
    builtins.object
        CurrencyConverter
    
    class CurrencyConverter(builtins.object)
     |  CurrencyConverter(ttl=300, conn=None, dpath=None)
     |  
     |  Convert currencies using temporary caching to reduce remote web calls.
     |  
     |  Methods defined here:
     |  
     |  __init__(self, ttl=300, conn=None, dpath=None)
     |      ttl: time to live, in seconds, of cached rates
     |      
     |      conn: database connection
     |      
     |      dpath: path to an sqlite3 database
     |      
     |      If a connection is given then it will be used, otherwise a connection will
     |      be created to the database specified by the path. If no path is given then
     |      a default path will be used.
     |  
     |  convert(self, fromCurrency, toCurrency, amount)
     |  
     |  get_rate(self, fromCurrency, toCurrency)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)

FUNCTIONS
    get_conversion_rate(fromCurrency, toCurrency)
    
    get_conversion_rate_from_webservicex(fromCurrency, toCurrency)
    
    get_conversion_rates(fromTos)
    
    get_conversion_rates_from_yahoo_finance(fromTos)
    
    get_parser()
    
    main()
    
    urlopen_to_text(f)
        Convert binary data from urlopen to text data with a generator.

DATA
    INFO_URL = 'http://finance.yahoo.com/currency-converter/'
    NAME = 'CurrencyConverter'
    RATES_URL = 'http://download.finance.yahoo.com/d/quotes.csv'
    WEBSERVICEX_INFO_URL = 'http://www.webservicex.net/CurrencyConvertor.a...
    WEBSERVICEX_RATES_URL = 'http://www.webservicex.net/CurrencyConvertor....
    YAHOO_FINANCE_INFO_URL = 'http://finance.yahoo.com/currency-converter/...
    YAHOO_FINANCE_RATES_URL = 'http://download.finance.yahoo.com/d/quotes....
Contact
echo xyne.archlinux.org | sed 's/\./@/'
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0