See the new background callback feature in 📣 Dash 2.6 Released - Background Callbacks, Unit Testing, Persistent Selections, Dropdown Features which moves app.long_callback
to dash.callback(background=True)
Since it’s part of the
dash
namespace, you won’t face the same circular import issues. Also, some of the issues reported around using this feature in dynamic layouts have been fixed.
See the new docs here: Background Callbacks | Dash for Python Documentation | Plotly