# Calling Julia from a Python Dash app

**URL:** https://discourse.julialang.org/t/calling-julia-from-a-python-dash-app/99011
**Category:** Web Stack
**Created:** [May 17, 2023, 6:26pm UTC](https://discourse.julialang.org/t/calling-julia-from-a-python-dash-app/99011 "2023-05-17T18:26:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lxvm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lxvm/32/50010_2.png) [@lxvm](https://discourse.julialang.org/u/lxvm)
#### Post date: [May 17, 2023, 6:26pm UTC](https://discourse.julialang.org/t/calling-julia-from-a-python-dash-app/99011/1 "2023-05-17T18:26:39Z")

</div>

I was wondering if calling Julia through a multi-threaded Python Dash app can in theory work in v1.9.0, since the new version allows the number of threads to change in the Julia runtime. The following simple Dash app using the `juliacall` package hangs when I try to run it, so I suspect interoperability in this context may not yet be supported?

```julia
from dash import Dash, dcc, html, Input, Output
from juliacall import Main
# from julia import Main # another option

app = Dash( __name__ )

app.layout = html.Div([
    html.H6("Change the value in the text box to see callbacks in action!"),
    html.Div([
        "Input: ",
        dcc.Input(id='my-input', value='initial value', type='text')
    ]),
    html.Br(),
    html.Div(id='my-output'),

])

@app.callback(
    Output(component_id='my-output', component_property='children'),
    Input(component_id='my-input', component_property='value'),
    prevent_initial_call=True
)
def update_output_div(input_value):
    Main.sum([1,2])
    return f'Output: {input_value}'

if __name__ == ' __main__':
    app.run_server(debug=True)

```
