Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

How to implement plotly.js with python for dynamic plotting

@app.route(’/home/’, methods=[‘POST’, ‘GET’])
def home():
cmpname = ""
if request.method ==“POST”:
cmpname = request.form[“text”].upper()
else:
return render_template(‘home.html’)
api_key = "abc"
data=[]
try:
data = quandl.get(str(“WIKI/” + cmpname), authtoken = api_key)
except:
return "Either you entered wrong symbol of the company or company is not registered with us."
return render_template(“home.html”, data = data)