示例#1
0
 def _set_con_params(self,
                     dsn=None,
                     user=None,
                     password=None,
                     host=None,
                     database=None,
                     sourcing_key=None):
     if sourcing_key:
         settings = read_settings()['DBAPI'][sourcing_key]
         if 'dsn' in settings:
             self.dsn = dsn or settings['dsn']
         if 'user' in settings:
             self.user = user or settings['user']
         if 'password' in settings:
             self.password = password or settings['password']
         if 'host' in settings:
             self.host = host or settings['host']
         if 'database' in settings:
             self.database = database or settings['database']
     else:
         self.dsn = dsn or ''
         self.user = user or ''
         self.password = password or ''
         self.host = host or ''
         self.database = database or ''
示例#2
0
    def __init__(self, dataset, **kwargs):
        super(QuandlFT, self).__init__()

        if 'authtoken' in kwargs:
            authtoken = kwargs['authtoken']
        else:
            authtoken = read_settings()['Quandl']['userone']['authtoken']
        tmp = {'dataset': dataset, 'authtoken': authtoken}
        tmp.update(kwargs)
        self.sourcing = tmp
        self._set_stype()
示例#3
0
    def __init__(self, dataset, **kwargs):
        super(QuandlFT, self).__init__()

        if 'authtoken' in kwargs:
            authtoken = kwargs['authtoken']
        else:
            authtoken = read_settings()['Quandl']['userone']['authtoken']
        tmp = {'dataset': dataset, 'authtoken': authtoken}
        tmp.update(kwargs)
        self.sourcing = tmp
        self._set_stype()
示例#4
0
 def _set_con_params(self, dsn=None, user=None, password=None, host=None,
                    database=None, sourcing_key=None):
     if sourcing_key:
         settings = read_settings()['DBAPI'][sourcing_key]
         if 'dsn' in settings:
             self.dsn = dsn or settings['dsn']
         if 'user' in settings:
             self.user = user or settings['user']
         if 'password' in settings:
             self.password = password or settings['password']
         if 'host' in settings:
             self.host = host or settings['host']
         if 'database' in settings:
             self.database = database or settings['database']
     else:
         self.dsn = dsn or ''
         self.user = user or ''
         self.password = password or ''
         self.host = host or ''
         self.database = database or ''