I am storing it like this in the database record. I was wondering if it would work in the session object as well.
rdf_row['rdf'] = anvil.BlobMedia("bytes", pickle.dumps(rdf), "anvil.pickle")
It contains customer data that I am reluctant to leave in the database. So I thought it would be better as a session object.