Saving a dictionary with a set of steps with the objective of repeating them automatically

I have an app ( in which the user uploads a file, and then can produce many different types of charts. There is no user identification mechanism, and I would like to leave it that way since the data can be sensitive.

The parameters to produce a given chart are written to a dictionary. At present the dictionary is discarded once the user plots chart A and goes not to plot chart B (a second dictionary is generated and discarded)

I would like to find a way (session state) that the user can plot chart A B and C, the dictionaries of the three plots are somehow sticked together in a jason file that the user can save.

When the users uploads the json, the app runs all three plots (saving them to png) with the new data the user has uploaded.

I am sure this is something session state can take care of, but not sure where to start.



It is unclear what you need help with. Storing a dictionary in session_state? Sticking three dictionaries together? Converting beetween dictionaries and JSON? Allowing users to download and upload JSON?

Thanks for your answer.

Saving a dictionary made up of a set of dictionaries each corresponding to a run of the app (a plot). I need to save all the dictionaries that have been produced during a session by the user.

Of course the user will need to tell me in some way that she wants to save a certain number of plot configurations (dictionaries) that she can download if a dictionary of dictionaries and then reupload to run as a loop.

At present I understand how to save the dictionary of one plot, but not how to “keep” many successive dictionaries (each corresponding to the parameters of a different plot) together.

Sorry I hope now is clearer. I need to stich together the dictionaries of a set of successive plots done by a given user that so to say wants to configure a repeatable report made up of many charts.

Thanks so much


Looks like a list of dictionaries would do.

Yes absolutely would do. And all you need to keep this list alive through a succession of processings ( n charts) is session state? That simple?

You tell me. But from your description I don’t see why you would need anything more than that. How else do you say “succesive dictionaries” in python?

Fantastico! Really fantastic.

Thanks so much I try!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.