I am writing a web application that receives a lot of data from a third-party server when (and only when) a user logs in. This data is parsed into user objects and stored in list() . Now the user works with this data throughout the application, calling different views (for example, sending different requests). I'm not sure what is the best template for passing a list of objects between view functions?
I technically see two possibilities, but I have flaws in my case:
- Session dict . Saving data in a session is redundant (the entire list will be sent back and forth between the server and the browser with each request)
- Saving . Temporarily stored data in the database seems more appropriate. But I was hoping not to use the database at all (with the exception of this temporary data, I have no data that needs to be stored locally, everything else was received from a third-party server and sent back).
I'm not a very experienced web developer, so maybe I'm watching the obvious. So is there another way to pass data between requests? Maybe some kind of built-in flash magic or is saved (in a file or database) really the only option?
python flask
cyphorious
source share