from createPieChart import createPieChart from config import dbPlayersLayout from dbCredentials import token, org, url, bucket, host, user, password, database # --------------- ON START ACTIONS --------------- app = dash.Dash(__name__, title='Faceit Stats') # initialize database connections db = Mysql(host=host, user=user, password=password, database=database) influx = Influx(token=token, org=org, bucket=bucket, url=url) # check if table 'players' exists result = db.checkIfTableExists('players') if not result: db.addTable(dbPlayersLayout) # select all names from the 'players' table players = db.select('players', None, 'name') # ------------------ APP LAYOUT ------------------ app.layout = html.Div([ html.H1("Analyze your Faceit CS:GO Statistics and compare it with others!", style={"color": "#fff"}), dbc.Row([ dbc.Col([ dbc.Input( id='input', type='text', placeholder=