Hi everyone. This should be a fairly basic set of questions, I suppose.
I've got some login going with Flask (not Flask-Login). What I want to do is have some temporary session data (Pandas manipulation) for a logged-in user. Here are my basic questions/decisions I need to make:
- what (should) define a session? e.g., starts at log in, ends on first of either logout or x days/minutes (or perhaps both - ends on logout including an auto-logout).
- what is a good practice for identifying a dataframe for this user? I suppose, for example, if it were a filename (conceptually) it could be userid+sessionid+a counter.df. Then delete that df on logout.
- beyond that, if I want to save my df to postgres as json (easy to do with Pandas), how should I think about storing the df and identifying the right one? Again by userid, sessionid, and a counter (so I'll delete the latter two + delete the df on logout)? I guess I'll have two tables (the 2nd is a session table).
Thanks for reading so far. I'm sure this probably isn't that difficult, but I needed to at least write down the question and see if someone chimes in with any interesting comments/advice.