@sisheng.zhang wrote:
Hi, I am trying to create a table from data from an API. I want to grab a parameter from the URL and make a call and plot a table. However, it does not work.
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) def dummy(): #Get parameter from request url #make API call here with parameter but it's not working df = request.get('https://...') layout = html.Div(style= { 'backgroundColor': color['background'] }, children=[ html.H4('US Agriculture Exports (2011)'), generate_table(df) ]) return layout app.layout = dummy
Posts: 4
Participants: 2