I'm interested in saving a python object in an openshift env variable.It appears the first thing to do is serialize the object with pickle. Based on http://pythontips.com/2013/08/02/what-is-pickle-in-python/, I have:
import pickle
a = ['test value','test value 2','test value 3']
file_Name = "testfile"
fileObject = open(file_Name,'wb')
pickle.dump(a,fileObject)
fileObject.close().
My next question is how to save the fileObject to a custom openshift env variable. Based on https://developers.openshift.com/en/managing-environment-variables.html#custom-variables, it appears you set it at the command line. I'd like to set it programmatically using python. How can I do this?