Is it possible to create an instance in a dash application code and call it inside the @app.callback?
I could call it inside, of course, but the way my class is made makes me need this specific feature.
To be more specific:
Assuming a class called Foo.
it would look like:
import dash
import dash_core_components as dcc
import dash_html_components as html
import Foof = Foo()
x = f.something()
app = dash.Dash()
app.layout = html.Div([…])
@app.callback( dash.dependencies.Output(id,property),
[dash.dependencies.Input(id,property)])
def callback(value):data =getattr(f,‘specific_data’)
…any other lines of code…
if name == ‘main’:
app.run_server(debug=True)