Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tut] Your First Dash App – How to Get Started in 4 Minutes or Less

#1
Your First Dash App – How to Get Started in 4 Minutes or Less



Minute 1: Install Dash


Type the following command in your terminal/shell.

Windows, macOS:

pip install dash

Linux, Ubuntu:

sudo pip install dash

Minute 2: Create Minimal Dash Project File “app.py”


Copy&paste the code into a new file called “app.py” in a folder – with path /path/to/dash_app/app.py:

# file app.py import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objects as go es = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=es) xs = list(range(30))
ys = [10000 * 1.07**i for i in xs] fig = go.Figure(data=go.Scatter(x=xs, y=ys))
fig.update_layout(xaxis_title='Years', yaxis_title='$') app.layout = html.Div(children=[ html.H1(children='Assets'), dcc.Graph(figure=fig)]) if __name__ == '__main__': app.run_server(debug=True)

Minute 3: Run Dash App


Open a terminal or shell in the /path/to/dash_app/ and run python app.py in it:

$ python app.py
Run Dash Terminal

Minute 4: Open Dash App in Your Browser


Copy or click on the IP address 127.0.0.1:8050 and open it in your browser.

Open Dash app in Browser

The post Your First Dash App – How to Get Started in 4 Minutes or Less first appeared on Finxter.



https://www.sickgaming.net/blog/2021/04/...s-or-less/
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tut] Python Plotly Dash Cheat Sheet xSicKxBot 0 32 04-15-2021, 12:24 PM
Last Post: xSicKxBot
  [Tut] Python Dash Book xSicKxBot 0 33 04-13-2021, 05:52 PM
Last Post: xSicKxBot
  [Tut] How to Use Dash Within a Jupyter Notebook? xSicKxBot 0 71 01-27-2021, 02:21 AM
Last Post: xSicKxBot
  [Tut] Hello World! A Python One-Liner to Get Started with Python Quickly xSicKxBot 0 138 09-07-2020, 06:10 PM
Last Post: xSicKxBot
  [Tut] 6 Easy Steps to Get Started with Python xSicKxBot 0 135 09-03-2020, 07:17 PM
Last Post: xSicKxBot

Forum Jump:

[-]
Active Threads
https://www.fettleride.com/lycium-serum-...
Last Post: joiranshom
Today 06:18 AM
» Replies: 0
» Views: 6
News - WWE 2K22 Will Get Regular Dev Vid...
Last Post: xSicKxBot
Today 06:13 AM
» Replies: 0
» Views: 8
(Indie Deal) Warhammer 40k: Gladius & Br...
Last Post: xSicKxBot
Today 04:44 AM
» Replies: 0
» Views: 5
(Free Game Key) The Dream Machine: Chapt...
Last Post: xSicKxBot
Today 04:44 AM
» Replies: 0
» Views: 4
Mobile - Demon Tower Defense codes – fre...
Last Post: xSicKxBot
Yesterday 11:43 PM
» Replies: 0
» Views: 6
News - Trials Of Mana 25th Anniversary C...
Last Post: xSicKxBot
Yesterday 11:43 PM
» Replies: 0
» Views: 5
News - This Samsung Monitor Can Do It Al...
Last Post: xSicKxBot
Yesterday 11:43 PM
» Replies: 0
» Views: 36
Xbox Wire - Boris the Rocket is Now Avai...
Last Post: xSicKxBot
Yesterday 06:45 PM
» Replies: 0
» Views: 5
News - Turkish mobile studio Ace Games r...
Last Post: xSicKxBot
Yesterday 06:45 PM
» Replies: 0
» Views: 33
News - Blog: Making a meaningful scent s...
Last Post: xSicKxBot
Yesterday 06:44 PM
» Replies: 0
» Views: 54

[-]
Twitter

Copyright © SickGaming.net 2012-2020