How can a unique Rserve connection be stored per session?
3 2 I'm writing a small Flask application and am having it connect to Rserve using pyRserve. I want every session to initiate and then maintain its own Rserve connection. Something like this: session['my_connection'] = pyRserve.connect() doesn't work because the connection object is not JSON serializable. On the other hand, something like this: flask.g.my_connection = pyRserve.connect() doesn't work because it does not persist between requests. To add to the difficulty, it doesn't seem as though pyRserve provides any identifier for a connection, so I can't store a connection ID in the session and use that to retrieve the right connection before each request. Is there a way to accomplish having a unique connection per session? python r flask rserve pyrserve share | improve this question edited Feb 10 '15 at 8:16 davidism 64.9k 12 172 188 asked Feb 10 '15 at 2:27 izyda izyda 405 2 15 W...