Skip to content

Commit 2631660

Browse files
authored
Update examples (#1096)
* run_server -> run * Update apps
1 parent 7e5d978 commit 2631660

File tree

23 files changed

+12027
-32
lines changed

23 files changed

+12027
-32
lines changed

docs/components_page/components/index/simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121

2222
# 5. Start the Dash server
2323
if __name__ == "__main__":
24-
app.run_server()
24+
app.run()

docs/content/docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ app.layout = dbc.Container(
6565
)
6666

6767
if __name__ == "__main__":
68-
app.run_server()
68+
app.run()
6969
```
7070

7171
## Examples

docs/demos/demo_layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ def for_path(self, component):
6666
if __name__ == "__main__":
6767
app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
6868
app.layout = _layout
69-
app.run_server(port=8888, debug=True)
69+
app.run(port=8888, debug=True)

docs/demos/theme_explorer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ def open_toast(_):
134134

135135

136136
if __name__ == "__main__":
137-
app.run_server(debug=True)
137+
app.run(debug=True)

docs/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ <h2>Get started quickly</h2>
6868
)
6969

7070
if __name__ == "__main__":
71-
app.run_server()</code></pre>
71+
app.run()</code></pre>
7272
</div>
7373
</div>
7474
<hr />

examples/advanced-component-usage/graphs_in_tabs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ def generate_graphs(n):
102102

103103

104104
if __name__ == "__main__":
105-
app.run_server(debug=True, port=8888)
105+
app.run(debug=True, port=8888)

examples/advanced-component-usage/navbars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,4 @@ def toggle_navbar_collapse(n, is_open):
165165
)(toggle_navbar_collapse)
166166

167167
if __name__ == "__main__":
168-
app.run_server(debug=True, port=8888)
168+
app.run(debug=True, port=8888)

examples/advanced-component-usage/toast.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def make_toast(message):
102102
is_open=True,
103103
dismissable=True,
104104
icon="danger",
105+
className="mb-2",
105106
)
106107

107108

@@ -114,4 +115,4 @@ def display_toasts(store):
114115

115116

116117
if __name__ == "__main__":
117-
app.run_server(debug=True)
118+
app.run(debug=True)

examples/gallery/faithful/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import plotly.figure_factory as ff
1515
from dash import Input, Output, dcc, html
1616

17-
DATA = pd.read_csv("https://cdn.opensource.faculty.ai/old-faithful/data.csv")
17+
DATA = pd.read_csv("data.csv")
1818

1919
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
2020

@@ -86,4 +86,4 @@ def make_graph(dropdown_value, checklist_value):
8686

8787

8888
if __name__ == "__main__":
89-
app.run_server(debug=True, port=8888)
89+
app.run(debug=True, port=8888)

examples/gallery/faithful/data.csv

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
eruptions,waiting
2+
3.6,79
3+
1.8,54
4+
3.333,74
5+
2.283,62
6+
4.533,85
7+
2.883,55
8+
4.7,88
9+
3.6,85
10+
1.95,51
11+
4.35,85
12+
1.8330000000000002,54
13+
3.917,84
14+
4.2,78
15+
1.75,47
16+
4.7,83
17+
2.167,52
18+
1.75,62
19+
4.8,84
20+
1.6,52
21+
4.25,79
22+
1.8,51
23+
1.75,47
24+
3.45,78
25+
3.0669999999999997,69
26+
4.533,74
27+
3.6,83
28+
1.9669999999999999,55
29+
4.083,76
30+
3.85,78
31+
4.433,79
32+
4.3,73
33+
4.467,77
34+
3.367,66
35+
4.033,80
36+
3.833,74
37+
2.017,52
38+
1.867,48
39+
4.833,80
40+
1.8330000000000002,59
41+
4.783,90
42+
4.35,80
43+
1.883,58
44+
4.567,84
45+
1.75,58
46+
4.533,73
47+
3.3169999999999997,83
48+
3.833,64
49+
2.1,53
50+
4.633,82
51+
2.0,59
52+
4.8,75
53+
4.716,90
54+
1.8330000000000002,54
55+
4.833,80
56+
1.733,54
57+
4.883,83
58+
3.717,71
59+
1.6669999999999998,64
60+
4.567,77
61+
4.317,81
62+
2.233,59
63+
4.5,84
64+
1.75,48
65+
4.8,82
66+
1.817,60
67+
4.4,92
68+
4.167,78
69+
4.7,78
70+
2.0669999999999997,65
71+
4.7,73
72+
4.033,82
73+
1.9669999999999999,56
74+
4.5,79
75+
4.0,71
76+
1.983,62
77+
5.067,76
78+
2.017,60
79+
4.567,78
80+
3.883,76
81+
3.6,83
82+
4.133,75
83+
4.333,82
84+
4.1,70
85+
2.633,65
86+
4.067,73
87+
4.933,88
88+
3.95,76
89+
4.5169999999999995,80
90+
2.167,48
91+
4.0,86
92+
2.2,60
93+
4.333,90
94+
1.867,50
95+
4.817,78
96+
1.8330000000000002,63
97+
4.3,72
98+
4.667,84
99+
3.75,75
100+
1.867,51
101+
4.9,82
102+
2.483,62
103+
4.367,88
104+
2.1,49
105+
4.5,83
106+
4.05,81
107+
1.867,47
108+
4.7,84
109+
1.7830000000000001,52
110+
4.85,86
111+
3.6830000000000003,81
112+
4.7330000000000005,75
113+
2.3,59
114+
4.9,89
115+
4.417,79
116+
1.7,59
117+
4.633,81
118+
2.3169999999999997,50
119+
4.6,85
120+
1.817,59
121+
4.417,87
122+
2.617,53
123+
4.067,69
124+
4.25,77
125+
1.9669999999999999,56
126+
4.6,88
127+
3.767,81
128+
1.9169999999999998,45
129+
4.5,82
130+
2.267,55
131+
4.65,90
132+
1.867,45
133+
4.167,83
134+
2.8,56
135+
4.333,89
136+
1.8330000000000002,46
137+
4.383,82
138+
1.883,51
139+
4.933,86
140+
2.033,53
141+
3.733,79
142+
4.2330000000000005,81
143+
2.233,60
144+
4.533,82
145+
4.817,77
146+
4.333,76
147+
1.983,59
148+
4.633,80
149+
2.017,49
150+
5.1,96
151+
1.8,53
152+
5.033,77
153+
4.0,77
154+
2.4,65
155+
4.6,81
156+
3.5669999999999997,71
157+
4.0,70
158+
4.5,81
159+
4.083,93
160+
1.8,53
161+
3.967,89
162+
2.2,45
163+
4.15,86
164+
2.0,58
165+
3.833,78
166+
3.5,66
167+
4.583,76
168+
2.367,63
169+
5.0,88
170+
1.933,52
171+
4.617,93
172+
1.9169999999999998,49
173+
2.083,57
174+
4.583,77
175+
3.333,68
176+
4.167,81
177+
4.333,81
178+
4.5,73
179+
2.417,50
180+
4.0,85
181+
4.167,74
182+
1.883,55
183+
4.583,77
184+
4.25,83
185+
3.767,83
186+
2.033,51
187+
4.433,78
188+
4.083,84
189+
1.8330000000000002,46
190+
4.417,83
191+
2.1830000000000003,55
192+
4.8,81
193+
1.8330000000000002,57
194+
4.8,76
195+
4.1,84
196+
3.966,77
197+
4.2330000000000005,81
198+
3.5,87
199+
4.3660000000000005,77
200+
2.25,51
201+
4.667,78
202+
2.1,60
203+
4.35,82
204+
4.133,91
205+
1.867,53
206+
4.6,78
207+
1.7830000000000001,46
208+
4.367,77
209+
3.85,84
210+
1.933,49
211+
4.5,83
212+
2.383,71
213+
4.7,80
214+
1.867,49
215+
3.833,75
216+
3.417,64
217+
4.2330000000000005,76
218+
2.4,53
219+
4.8,94
220+
2.0,55
221+
4.15,76
222+
1.867,50
223+
4.2669999999999995,82
224+
1.75,54
225+
4.4830000000000005,75
226+
4.0,78
227+
4.117,79
228+
4.083,78
229+
4.2669999999999995,78
230+
3.917,70
231+
4.55,79
232+
4.083,70
233+
2.417,54
234+
4.183,86
235+
2.217,50
236+
4.45,90
237+
1.883,54
238+
1.85,54
239+
4.283,77
240+
3.95,79
241+
2.333,64
242+
4.15,75
243+
2.35,47
244+
4.933,86
245+
2.9,63
246+
4.583,85
247+
3.833,82
248+
2.083,57
249+
4.367,82
250+
2.133,67
251+
4.35,74
252+
2.2,54
253+
4.45,83
254+
3.5669999999999997,73
255+
4.5,73
256+
4.15,88
257+
3.8169999999999997,80
258+
3.917,71
259+
4.45,83
260+
2.0,56
261+
4.283,79
262+
4.7669999999999995,78
263+
4.533,84
264+
1.85,58
265+
4.25,83
266+
1.983,43
267+
2.25,60
268+
4.75,75
269+
4.117,81
270+
2.15,46
271+
4.417,90
272+
1.817,46
273+
4.467,74

0 commit comments

Comments
 (0)