I have a large object that is fairly dynamic that I want to serialize and store in my sqlite database. Using the pickle module, I made it into a string but found I had to do a string replace on it to change the single quotes out in order to store it to the db. When I take it out, I just undo that. I am new to using pickle and sqlite and this at least works, but is this really the right way to go about it or is there a correct way to handle this that I am not seeing?
menu = pickle.dumps(menuOb)
menu = menu.replace("'", "''")
#sql statement stuff