data_providers_setup.py 451 B

12345678910
  1. from interface_sqlite3.query_handlers import queryHandlerBasicSqlite
  2. # Creates the 'query handler' object (that handles communications with the DB) according to configuration specifics
  3. def queryHandlerFactory(dataConfig):
  4. if dataConfig.get('data_interface')=='sqlite3':
  5. return queryHandlerBasicSqlite(dataConfig)
  6. else:
  7. raise Exception('Unrecognized data interface in app configuration: ' + dataConfig.get('data_interface'))