That was more my musing, wondering if an “append” operation were built into the Storage component somewhere, because that would be very efficient if I wanted to save a small live-stream into Dash.
A less efficient than the above (though still more efficient than the other alternatives I can think of), but practically the same thing, method of sending streaming data into a dcc.Store
object would be to create a single callback where the same dcc.Store
data
attribute is both the Output
, as well as a State
input.
By doing this semi-circular logic, the first time data is sent to dcc.Store
, you can send it normally, but once the stream gets going and you want to start appending, simply reference the same dcc.Store
in the State
(which has your stream’s beginning data already), append to that data object, and send it back to dcc.Store
in the Output
.
This ability to do this is one of Dash’s strong points. Let me know if you need more help.