After a day of researching how to ensure my functions execute in the right sequence, I have realized Dash really is not designed to run applications, though it makes powerful interactive graphics and dashboards.
Apparently, the only way to execute my functions in the proper order is to chain them together with “chained callbacks” via Input/Outputs. In other words, the Output of one function triggers the execution of the next function provided it is the input of the next function. That is my current understanding at least. If not, I stand corrected.
In my case, those Inputs/Outputs are text files.
One function creates a text file the next function needs to perform its duties. This is true until the application produces an editable graph for the user to edit/approve before final processing. Dash does not seem designed for this sort of process. There does not seem to be a way to use files or filenames as the Input or Output of a callback. Even if this were possible, there are other steps along the way that seem to defy Dash logic.
I hope I am wrong. I would love to be wrong, but I don’t want to waste more time. If I am wrong, how can I use chained callbacks to force my functions to trigger in sequence given that the Inputs are text files. Is that possible?
Can you please provide an example?
Thank you.
11 posts - 3 participants