示例#1
0
 def __init__(self):
     config = get_values()
     # self.data_check = self.validate_data()
     self.root_user = config.db_user_root
     self.root_pass = config.db_pass_root
     self.user = config.db_user
     self.password = config.db_pass
     self.host = config.db_host
     self.stock_db = config.stock_db_name
     self.sentiment_db = config.sentiment_db_name
     self.utility_db = config.utility_db_name
     try:
         self.conn_finance = connect.connect(host=f"{self.host}",
                                             user=f"{self.user}",
                                             password=f"{self.password}",
                                             database=f"{self.stock_db}")
         self.conn_sentiment = connect.connect(
             host=f"{self.host}",
             user=f"{self.user}",
             password=f"{self.password}",
             database=f"{self.sentiment_db}")
         self.conn_utility = connect.connect(host=f"{self.host}",
                                             user=f"{self.user}",
                                             password=f"{self.password}",
                                             database=f"{self.utility_db}")
     except error:
         print("Error connecting to database")
示例#2
0
 def __init__(self):
     config = get_values()
     self.conn = database().conn_sentiment
     self.news_tables = {}
     self.tickers = [('VRCA', ), ('AAPL', ), ('SG', ), ('SFT', ),
                     ('PBTS', ), ('IMAC', ), ('HOLI', ), ('AACG', )]
     # https://chromedriver.chromium.org/downloads
     # self.tickers = crud().get_list_of_stocks()
     self.finwiz_url = config.finwiz_url
     self.time = time
示例#3
0
 def __init__(self):
     config = get_values()
     self.user = config.db_user
     self.host = config.db_host
     self.password = config.db_pass
     self.stock_db_name = config.stock_db_name
     self.sentiment_store_db_name = config.sentiment_db_name
     self.db_user_root = config.db_user_root
     self.db_root_pass = config.db_pass_root
     self.utility_db_name = config.utility_db_name
     self.predict_db_name = config.predict_db_name
示例#4
0
 def __init__(self):
     config = get_values()
     self.conn = database().conn_finance
     self.error = database()
     self.tables = tables.build_tables()
     self.directory = config.file_location
     self.stock_table_list_name = "STOCK_LIST_TBL"
     self.exchange = {
         "nasdaq.txt": config.nasdaq_listed_url,
         "nyse.csv": config.nyse_listed_url,
         "amex.csv": config.amex_listed_url
     }
示例#5
0
 def __init__(self):
     config = get_values()
     self.conn = database().conn_finance
     self.stock_table_list_name = "STOCK_LIST_TBL"
示例#6
0
 def __init__(self):
     config = get_values()
     self.daily_schedule_run_time = config.daily_schedule_run_time
     self.weekly_schedule_run_time = config.weekly_schedule_run_time