Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Storing objects and intermediate results

$
0
0

Hi there!

I started playing around with Dash. I am trying to build some kind of dashboard with respect to an app that backtests technical trading strategies.

Basically, all the backend work has already been done. I can use it with a traditional python script. When building the GUI, I stumbled across some questions with respect to storing intermediate results.

For instance, I am downloading price data. The result is a python dict that contains pd.DataFrames. Now, as far as I understand it, I could use a dcc.Store. However, this requires the serialization into JSON format at the time of writing and the de-serialization when reading the data. I am looking for a solution to simply store the dict as is.

Also, I do have an instances of an object that has a bunch of different properties, such as strings, lists, pd.DataFrames, as well as dicts containing pd.DataFrames. In production, these dataframes may be very big. As a result, this object may occupy lots of memory (talking >20GB). How to store it in a best way?

I am wondering what might be a suitable strategy to tackle these issues. Usually, I am simply storing the data/objects in python variables within my script. How am I supposed to transfer this concept to DASH?

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles