-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoneline.py
More file actions
28 lines (28 loc) · 789 Bytes
/
oneline.py
File metadata and controls
28 lines (28 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(
lambda app, layout, dash: setattr(app, "layout", layout)
or app.callback(
dash.dependencies.Output(
component_id="my-div", component_property="children"
),
[
dash.dependencies.Input(
component_id="my-input", component_property="value"
)
],
)(lambda x: f"Hello {x if x is not None else 'there'}!")
and app.run_server(port=8060, debug=True)
)(
*(
lambda dash, html, dcc: (
dash.Dash(__name__),
html.Div(
children=[html.Div(id="my-div"), dcc.Input(id="my-input")]
),
dash,
)
)(
__import__("dash"),
__import__("dash_html_components"),
__import__("dash_core_components"),
)
)